-1

When I have Spring Security disabled, Swagger2 (springfox 2.5) seems to work fine, but when I enable it again, the JSON it produces when calling http://localhost:8082/v2/api-docs seems to have some kind of problem. Taking a look at the browser console I find:

TypeError: e.schema is undefined

Comparing both api-docs, the one produced with Spring Security on is much longer. I have done all that says here. It was really helpful for being able to reach Swagger with Spring Security on, but it seems not to be enough. Why are these JSON so different? Why the one with Spring Security on seems to lack some info?

Community
  • 1
  • 1
Josi
  • 306
  • 2
  • 14

1 Answers1

0

We have also used below paths in our spring security config and it was enough:

"/v2/api-docs", "/configuration/ui", "/swagger-resources", "/configuration/security", "/swagger-ui.html", "/webjars/**"

Could you show some code?

What kind of JSON converter do you use? Gson, Jackson?

Do you have some spring/spring security configuration in xml files?

Ziemowit Stolarczyk
  • 1,014
  • 2
  • 11
  • 26
  • Thank you, that was the first I tried. Now we moved to another config so we do not need it anymore. Thanks anyway! :) – Josi Jan 25 '17 at 09:27