Skip to content

Need flexibility regarding how to handle @JsonIgnoreProperties annotations #2125

@dhoffer

Description

@dhoffer

Currently the OpenAPI generated where @JsonIgnoreProperties removes one or more fields is to generate an inline custom object instead of referencing via $ref the model where @JsonIgnoreProperties was not used, and technically this is correct as the real model actually is a variant.

However this bloats our OpenAPI file size and in our case users really don't need/want the custom model generated inline. Rather they want it to ignore the @JsonIgnoreProperties and just reference the normal model via $ref. In our cases its perfectly fine that the model will not have any data for the field(s) excluded with @JsonIgnoreProperties.

So could there be an optional flag to ignore annotations like @JsonIgnoreProperties?

Thanks,
-David

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions