Issue
I am new to String and Swagger 3.
How can I change the default API description i.e. OpenAPI definition
in Swagger springdoc-openapi-ui swagger 3
src="https://i.stack.imgur.com/7WoYY.png" alt="enter image description here" />
Also version, developer information..
I am using
implementation "org.springframework.boot:spring-boot-starter-web:2.6.6"
implementation "org.springdoc:springdoc-openapi-ui:1.6.8"
In search, I see only they are showing default Swagger UI
Solution
Simply use following annotations :
In application launcher class(Configuration class):
@OpenAPIDefinition(info=@Info(title="Name of project"))
In Controller
import io.swagger.v3.oas.annotations.*
Calss level:
@OpenAPIDefinition()
Or
@Tag(name = "", description = "")
Method level :
@Operation()
@ApiResponses()
Answered By - Tohid Makari
Answer Checked By - Pedro (JavaFixing Volunteer)