0

In the Swagger docs I read that the @SwaggerDefinition annotation can be placed in any of the classes that are scanned during the Swagger auto-configuration process.

I put the annotation in my controller class inside the controller package, and I set this package as a base-package using the context:component scan tag in my dispatcher-servlet.xml. However, the Swagger UI page still shows the default title, contact email, etc. which means it's not picking up my @SwaggerDefinition.

How do I resolve this problem? Any pointers would be appreciated. Kinda lost atm. Thanks!

Akshay Damle
  • 1,220
  • 3
  • 18
  • 31

1 Answers1

1

In springfox the equivalent of @SwaggerDefinition is using the api in the Docket to customize the service description. The @SwaggerDefinition annotation is not supported in springfox.

Dilip Krishnan
  • 5,417
  • 3
  • 37
  • 53