[BUG][GO] Invalid property type for free form object
Created by: shaxbee
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
What's the version of OpenAPI Generator used? -
Have you search for related issues/PRs? -
What's the actual output vs expected output? map[string]interface{}
Description
Free form object property yields map[string]map[string]interface{}
where it should be map[string]interface{}
openapi-generator version
4.0.1
OpenAPI declaration file content or url
components:
schemas:
Response:
type: object
properties:
payload:
type: object
additionalProperties: {}
Command line used for generation
openapi-generator-cli generate -i ../api.yaml -g go -o . -DpackageName=api -DwithGoCodegenComment
Steps to reproduce
Generate go client using given schema.
Suggest a fix
Tried changing getTypeDeclaration
in AbstractGoCodegen.java
to use ModelUtils.isFreeFormObject
to no avail.
Also attempted changing template with no success.