Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Need flexibility regarding how to handle @JsonIgnoreProperties annotations #2125

Open
dhoffer opened this issue Jan 3, 2025 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@dhoffer
Copy link

dhoffer commented Jan 3, 2025

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

@MikeEdgar MikeEdgar added the enhancement New feature or request label Jan 4, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants