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

springdoc.model-and-view-allowed #1892

Closed
jlafuenteriberaLM opened this issue Oct 18, 2022 · 3 comments
Closed

springdoc.model-and-view-allowed #1892

jlafuenteriberaLM opened this issue Oct 18, 2022 · 3 comments
Labels
incomplete incomplete description: Make sure you Provide a Minimal, Reproducible Example - with HelloController

Comments

@jlafuenteriberaLM
Copy link

Describe the bug
If property springdoc.show-actuator=true is set and springdoc.model-and-view-allowed=false, ModelAndVew Endpoints are still exposed in swagger.

If property springdoc.show-actuator=false is set and springdoc.model-and-view-allowed=false, ModelAndVew Endpoints are not exposed.

Expected behavior
ModelAndView endpoints should not appear even if springdoc.show-actuator=true.

@bnasslahsen
Copy link
Contributor

Not reproducible
Please Provide a Minimal, Reproducible Example - with HelloController that reproduces the problem.

This ticket will be closed, and can be reopened if the relevant information are provided.

@bnasslahsen bnasslahsen added the incomplete incomplete description: Make sure you Provide a Minimal, Reproducible Example - with HelloController label Oct 18, 2022
@jlafuenteriberaLM
Copy link
Author

Here is and example,
https://github.com/jlafuenteriberaLM/HelloTestSpringDoc

SwaggerURL -> http://localhost:8080/hello/swagger-ui/index.html

If started with this properties:

springdoc.show-actuator=true
springdoc.model-and-view-allowed=false

Actuator endpoint and ModelAndView Enpoint are shown. (ModelAndView should not)
1

If started with this properties:

springdoc.show-actuator=false
springdoc.model-and-view-allowed=false
2

Actuator endpoint and ModelAndView Enpoint are not shown.

@bnasslahsen bnasslahsen reopened this Oct 19, 2022
@bnasslahsen
Copy link
Contributor

@jlafuenteriberaLM,

This will be out of the box for the next release.
The workarounds for now, is to add @Hidden on the method with ModelAndView

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incomplete incomplete description: Make sure you Provide a Minimal, Reproducible Example - with HelloController
Projects
None yet
Development

No branches or pull requests

2 participants