Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #3277
Closed
Open
Issue created Jul 03, 2019 by Administrator@rootContributor5 of 5 checklist items completed5/5 checklist items

[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.

Assignee
Assign to
Time tracking