smallrye-open-api icon indicating copy to clipboard operation
smallrye-open-api copied to clipboard

Need flexibility regarding how to handle @JsonIgnoreProperties annotations

Open dhoffer opened this issue 1 year ago • 0 comments

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

dhoffer avatar Jan 03 '25 15:01 dhoffer