Open grokify opened 6 years ago
Bump. This is still an issue.
You should pretty much never use *interface{} in go, as the regular interface{} is already nil-able.
hey @moshegood, thanks for bumping this. What is the best approach for this? i could help applying changes.
Hi @HugoMario. I've got a fix to this in a PR here: https://github.com/swagger-api/swagger-codegen/pull/10932
Description
Definition property
"type": "object"
gets converted to*interface{}
which returns an error when set to a struct or pointer pointer.Swagger-codegen version
2.3.1
Swagger declaration file content or url
https://github.com/grokify/go-ringcentral/blob/28498505dba03a0d355a88e37d7c9ad1a338255b/codegen/swagger_ringcentral_spec.json
Command line used for generation
https://github.com/grokify/go-ringcentral/tree/28498505dba03a0d355a88e37d7c9ad1a338255b/codegen
Steps to reproduce
Related issues/PRs
https://github.com/grokify/go-ringcentral/issues/10
Suggest a fix/enhancement
Set to
interface{}
instead of*interface{}