Open hiteshbargujar opened 9 years ago
@hiteshbargujar This is not supported and most likely will not be supported. Follow this issue for updates
What would be the correct way to add these values the. For eg. Base url, license etc.
Using the Docket#apiInfo()
Thanks. This sample https://github.com/springfox/springfox-demos/blob/master/boot-swagger/src/main/java/springfoxdemo/boot/swagger/Application.java and the working example here: http://fizzylogic.nl/2015/07/29/quickly-generate-api-docs-for-your-spring-boot-application-using-springfox/ helped.
Modified the SwaggerConfiguration class and all is good.
The referenced issue is now closed, yet still it doesn't look like @SwaggerDefinition works. Is it something that springfox is supposed to support now?
@pagrus7 see this comment. It doesn't make sense to support that annotation. The docket lets you do everything it provides.
Docket#apiInfo() is deprecated now, what is the alternative way to override swagger properties (Title, description, Contact email etc) ?
Hello, I think the support of @SwaggerDefinition would be a good thing as it would separate the definitions of the api from the tool used to generate the documentation of the api. Besides, I cannot figure how to generate externalDocs with springfox, although there is an annotation @ExternalDocs in @SwaggerDefinition.
@zulfyadhie Docket#apiInfo
as such is not deprecated. The ApiInfo contstructor is deprecated in favor of a richer contact object model.
@benfonty That is easily supported via all the available extensibility mechanisms. At the moment that is not priority since it there is ability via plugins to extend all of the things it provides.
Secondly, for OpenAPI 3.0 support these annotations will no longer work (package/breaking change in the swagger libraries). So investing in providing this feature is not priority.
I am integrating swagger annotation and ui for my service (spring boot App). I want to override some of the Swagger Properties like Contact Email, API Version, BaseURL.
I see we have @SwaggerDefinition Annotation present, but the changes do not show up on the UI or the json spec.
If we have support for this, please provide a demo for the same.