Skip to content

Enhancement: Set isFreeFormObject property #1315

Open
@wheezil

Description

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions