Bug Report Checklist
Description
The generator generates code like
if someStruct{} == nil {
// ...
Which is invalid as a struct can't be nil.
go build output of my generated client:
[...]
./model_export_request.go:107:3: cannot use nil as type Files in return argument
./model_read_single_items_blogs_200_response.go:41:24: cannot convert nil to type ItemsBlogs
./model_read_single_items_blogs_200_response.go:51:24: cannot convert nil to type ItemsBlogs
./model_read_single_items_blogs_200_response.go:52:3: cannot use nil as type ItemsBlogs in return argument
./model_read_single_items_blogs_200_response.go:59:24: cannot convert nil to type ItemsBlogs
./model_read_single_items_blogs_200_response.go:73:12: cannot convert nil to type ItemsBlogs
[...]

openapi-generator version
6.2.0
OpenAPI declaration file content or url
This spec is generated by https://github.com/directus/directus
https://gist.github.com/NickUfer/3c004a00df5ca1420b9949613ddaeb61
Generation Details
config file:
disallowAdditionalPropertiesIfNotPresent: true
packageName: directusclient
generateInterfaces: true
structPrefix: true
enumClassPrefix: true
cmd:
generate -i /tmp/oas.yaml -g go -o "/tmp/directusclient" -c /tmp/go.yml
Steps to reproduce
Related issues/PRs
Suggest a fix
Bug Report Checklist
Description
The generator generates code like
Which is invalid as a struct can't be nil.
go buildoutput of my generated client:openapi-generator version
6.2.0
OpenAPI declaration file content or url
This spec is generated by https://github.com/directus/directus
https://gist.github.com/NickUfer/3c004a00df5ca1420b9949613ddaeb61
Generation Details
config file:
cmd:
Steps to reproduce
Related issues/PRs
Suggest a fix