Swagger document for spring security using xml configuration -


i tried using swagger, spring-rest-doc , spring-fox generate documentation spring mvc based rest services. however, challenge document spring security xml configuration based endpoints. far spring-fox has been winner. documents of methods spring security supports. ideas on how filter out ones need?

for instance, when use /swagger-ui.html pull documentation page see following groups:

  • basic-error-controller
  • authorization-endpoint
  • whitelabel-approval-endpoint
  • health-checker

of need authorization-endpoint , health-checker. ideas?

have looked @ documentation to transition 2.0?

@bean public docket swaggerspringmvcplugin() {     return new docket(documentationtype.swagger_2)         .groupname("business-api")         .select()             //ignores controllers annotated @customignore           .apis(not(withclassannotation(customignore.class))            // , paths           .paths(paths())            .build()         .apiinfo(apiinfo())         .securityschemes(securityschemes())         .securitycontext(securitycontext()); } 

you should able use requesthandlerselectors filter apis need using following predicates

  • class annotations example show above withclassannotation
  • method annotations (for filtering operations) withmethodannotation
  • by base package basepackage

i suspect you've figured out how work xml configuration (in case title of question incorrect). in case need more examples there plenty of demos , examples. if have more questions, issue tracker better place stackoverflow.com dont frequent often.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -