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
  • #1315
Closed
Open
Issue created Oct 25, 2018 by Administrator@rootContributor

Enhancement: Set isFreeFormObject property

Created by: wheezil

Description

A free-form object field in a model can be hard to distinguish from other types in the mustache template. Making this an explicit property would be helpful

openapi-generator version

3.3.1

OpenAPI declaration file content or url
	"object_field": { 
		"type":"object"
	}
Command line used for generation

This does not seem to be specific to any generator, although different generators deal with "object" differently -- some consider it to be a primitive type and others do not.

Steps to reproduce

Process any OpenAPI definition file with model containing a field like above.

Related issues/PRs

none

Suggest a fix/enhancement

For free-form object fields, set an isFreeFormObject property to true. Add this property field to CodegenParameter and CodegenProperty, as a peer to isString, isPrimitiveType, etc. I am not yet clear what logic should be used to set this field.

Assignee
Assign to
Time tracking