How to limit the OpenAPi documentation to endpoint resources / methods of a certain role (PublicApiUser)? #681
Replies: 1 comment
-
Newer Quarkus versions support MP OpenAPI 4, but I think if you're using the LTS version that is the latest.
Yes, the
try this:
I don't know if that's the reason why your result is empty, but you can try it. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have some internal endpoints for the React App of our SaaS, some internal endpoints only for the Admin role - and some endpoints that may be used by the PublicApiUser role. For the OpenApi documentation on production, I only want to show the publicly available endpoints for the PublicApiUser role. How can this be done?
I use Quarkus, which seems to be limited to the Microprofile-openapi-api-3.1.2?
Is "OASFilter" the right thing to implement? I tried something below... but it filtered out basically everything. I need the endpoints, but obviously also the Java record (Dtos) used in Post bodies - but only those records used by the endpoints in question, and not all of them.
https://pastebin.com/gpFfgCCP
I looked for some public / open source examples that cover the subject in detail.. but couldn't find anything.
Any hit is greatly appreciated.
Thanks,
Marcus
Beta Was this translation helpful? Give feedback.
All reactions