-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support inheritance #147
Comments
By default OpenApi only includes properties exposed by getters, not fields as fields are rarely exposed in api. You can enforce fields resolution with |
my example was bad the
when open the swagger site only
expected json result:
The same behaviour can be observed for the I just mentioned the setters because in Javalin 4 the setters were needed, just as hint for people try to migrate from 4 to 5. |
I see, this is slightly associated with #87 as there's no heritage analysis atm. I'll include all properties for now and we'll see how it evolves |
Hi i figured out a problem when using:
The MyRequestClass extends from MyBaseRequest since all Request should have a common set of fields.
public class MyRequestClass extends MyBaseRequest implements Serializable{....}
i just get all fields having a getter in myRequestClass but not the fields defined in MyBaseRequest.
This functionality was present in Javalin 4 (but need the setter and not getters).
Is this a Bug(enhancement) or I made it wrong?
I tested the behaviour for @OpenApiReponse as well, it behaves the same as @OpenApiRequestBody so it seems the @OpenApiContent doesn't process the inheritance.
The text was updated successfully, but these errors were encountered: