-
Notifications
You must be signed in to change notification settings - Fork 91
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 for BeanParam and MultipartForm #239
Comments
Hi @SetoKaiba - please post the JAX-RS method where the |
I found out the problem. When I use @Form, the params from the parent is there. When I use @MultipartForm from, the params from the parent is missing. |
Change the @MultipartForm to @Form, it will contain the token and os from Verify. But then it doesn't support multipart form data. @Path("/uploadUserAvatar")
@POST
@Consumes(MediaType.MULTIPART_FORM_DATA)
public Result uploadUserAvatar(@MultipartForm UploadIconForm form) { "/rest/user/uploadUserAvatar" : {
"post" : {
"requestBody" : {
"content" : {
"multipart/form-data" : {
"schema" : {
"type" : "object",
"properties" : {
"icon" : {
"type" : "array",
"items" : {
"format" : "byte",
"type" : "string"
}
}
}
}
}
}
},
"responses" : {
"200" : {
"description" : "OK",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Result"
}
}
}
}
}
}
}, |
@SetoKaiba - the OpenAPI parameter scanner currently does not support inheritance on types annotated with We can leave this issue open as a task to enhance the scanner to support inheritance on those types of requests in the future. |
Thank you. It does help. At least, it's correctly show the openapi and swagger-ui now, |
@MikeEdgar I believe that mislabelling this as an enhancement has caused this issue to not receive the appropriate priority. @BeanParam supports inheritance and the APIDoc does not appropriately reflect the inherited parameters. Also, I am using Thank you |
@sean-scott-lr, I understand your point, but from an annotation scanning perspective it is an unimplemented feature rather than one that is just not working properly. Granted, it is not working as users expect.
@phillip-kruger, where does this issue fall in your list of priorities? I'm happy to take a deeper look at it also if you want to reassign it to me. |
Thanks @MikeEdgar ! |
Based on the uncertainty around how downstream servers will be incorporating the next major MP version, I think it makes sense for this change to be made to both |
Thank you so much. |
@MikeEdgar Thank you for fixing. I see its been merged to 1.x, When can we expect this to be in a release? |
@phillip-kruger - do you think it's time for a 1.x release? I think it would be good to make the latest fixes on 1.x generally available. |
Sure ! Let's do it. |
Great, thank you. Hopefully Quarkus can pull it into 1.4.0 |
I have forms for resteasy. The token and os is missing in the openapi and swagger-ui.
The json schema is without problem. But the forms isn't.
What should I do to make it correct in the openapi?
The text was updated successfully, but these errors were encountered: