Skip to content

Configurable cache'ing of OpenAPI instances #1554

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

Closed
piotrp opened this issue Mar 15, 2022 · 0 comments
Closed

Configurable cache'ing of OpenAPI instances #1554

piotrp opened this issue Mar 15, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@piotrp
Copy link

piotrp commented Mar 15, 2022

Is your feature request related to a problem? Please describe.
I want to filter returned OpenAPI operations by using logged-in user's permissions - hide administrative endpoints from end-users, while still allowing application administrators to view them. Currently I'm running with disabled cache, but building OpenAPI definitions is expensive ("Init duration for springdoc-openapi" reports between 500 and 1000ms on my laptop) and I'd like to optimize this.

Describe the solution you'd like
A way to customize cache'ing, basically override get/set methods on OpenAPIService.cachedOpenAPI. Or making constructor of OpenAPIService public so that I can provide custom implementation.

Describe alternatives you've considered
A separate GroupedOpenApi instances, but this would require dynamic filtering of /metadata/{group} (MultipleOpenApiWebMvcResource) and /metadata (SwaggerConfigResource).

@bnasslahsen bnasslahsen added the enhancement New feature or request label Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants