Skip to content

@Hidden controller showing up in swagger UI when springdoc.show-actuator is enabled #907

Closed
@moxaj

Description

@moxaj

Describe the bug
If I set springdoc.show-actuator to true, controllers annotated with @Hidden are visible in the swagger UI.

To Reproduce
In a spring boot project:

  • add springdoc.show-actuator=true to application.properties
  • create a new controller with a @Hidden annotation:
@Controller
@Hidden
public class SomeController {
  @RequestMapping("/hello")
  public String index() {
    return "..";
  }
}

Expected behavior
SomeController shouldn't show up in the swagger UI. However, it does, along with basic-error-controller, which was previously hidden.

Additional context
Spring boot version: 2.3.4.RELEASE
Springdoc version: 1.4.8 (using springdoc-openapi-ui, springdoc-openapi-data-rest, springdoc-openapi-security)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions