-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
REST Data with Panache paging parameters should be visible at Swagger/OpenAPI #11391
Comments
/cc @EricWittmann, @MikeEdgar, @phillip-kruger |
Hi @alievrenkut . Thanks for this issue. Do you perhaps have a small project I can look at ? |
Hi you can clone: https://github.com/alievrenkut/quarkus-rest-data-panache which is sample project I created with quarkus. You can see that after I run "gradlew quarkusDev" you will see that there is no page parameters: |
Hi @alievrenkut - Thanks for this. This is a feature request to the I would say the panache maintainers needs to look at how to do this best. I would suggest :
@FroMage - w.d.y.t ? I am happy to do the PR if you agree with the approach. Let me know. |
I would have to remember why @gytis didn't use |
Because the pagination can be disabled, I have decided to use |
I think we can still use UriInfo, just also add the OpenAPI annotations when pagination is possible. (And OpenAPI extension is added) |
Isn't it simpler to add query parameters (since they're always optional) rather than include an optional dependency on OpenAPI? |
Yes definitely ! |
I'm ok with adding the query params in place of the public interface MyEntityController extends PanacheEntityResource<MyEntity, Long> {
@MethodProperties(path = "/some-custom-path")
Response list(int page, int pageSize, String sort);
} |
I think that's fine, most IDEs can do that if you add the |
OK, assign this issue to me then and I'll sort it out. |
Your wish is my command. |
Description
I created a PanacheEntityResource and generated OpenAPI description but pagination parameters are not visible to Swagger so I can not give pagination parameter from Swagger UI. I also generated Typescript API from it using swagger-typescript-api. I can not see paging parameters from Typescript side too.
Could you add necessary info at RestDataResource?
The text was updated successfully, but these errors were encountered: