Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.3 KB

getting-started.adoc

File metadata and controls

33 lines (24 loc) · 1.3 KB

Getting Started

For the integration between spring-boot and swagger-ui, add the library to the list of your project dependencies (No additional configuration is needed)

   <dependency>
      <groupId>org.springdoc</groupId>
      <artifactId>springdoc-openapi-ui</artifactId>
      <version>{springdoc-legacy-version}</version>
   </dependency>

This will automatically deploy swagger-ui to a spring-boot application:

  • Documentation will be available in HTML format, using the official swagger-ui jars

  • The Swagger UI page will then be available at http://server:port/context-path/swagger-ui.html and the OpenAPI description will be available at the following url for json format: http://server:port/context-path/v3/api-docs

    • server: The server name or IP

    • port: The server port

    • context-path: The context path of the application

  • Documentation will be available in yaml format as well, on the following path : /v3/api-docs.yaml

Tip
For custom path of the swagger documentation in HTML format, add a custom springdoc property, in your spring-boot configuration file: .
# swagger-ui custom path
springdoc.swagger-ui.path=/swagger-ui.html