openapi spec:
/1/values/:
get:
operationId: getValues
parameters:
- in: query
name: lang
schema:
type: string
enum:
- fr
- en
default: en
generates the following code:
func NewGetValuesRequestWithBody(server string, params *GetValuesParams, contentType string, body io.Reader) (*http.Request, error) {
...
if params.Lang != nil {
}
}
which causes panic invalid memory address or nil pointer dereference
it should be checked for nil
openapi spec:
generates the following code:
which causes panic
invalid memory address or nil pointer dereferenceit should be checked for nil