Skip to content
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 @Hidden annotation on REST repositories #1881

Closed
mjustin opened this issue Oct 11, 2022 · 1 comment
Closed

Support @Hidden annotation on REST repositories #1881

mjustin opened this issue Oct 11, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@mjustin
Copy link

mjustin commented Oct 11, 2022

Is your feature request related to a problem? Please describe.
I have a Spring Data REST project where I would like to exclude a specific REST repository from the generated OpenAPI documentation. I do not see an easy way to do this. If this were a controller, I could merely annotate it with @Hidden to achieve this goal.

Describe the solution you'd like
When using springdoc-openapi-data-rest, it would be nice if specific repositories could be disabled using @Hidden in the same manner as applying it to a controller hides the controller. A repository thus annotation would be completely skipped as though it did not exist when generating the OpenAPI description.

Additional context
This feels in line with how other annotations are supported in @Repository classes, for instance @SecurityRequirement and @Tag

@bnasslahsen bnasslahsen added the enhancement New feature or request label Oct 14, 2022
bnasslahsen added a commit that referenced this issue Oct 14, 2022
@bnasslahsen
Copy link
Contributor

@mjustin,

Support is now added in @Repository level. Not in the operations level.
Note that you can use OpenApiCustomiser for any other filtering needed.

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