Swagger add
This commit is contained in:
parent
fefa62627a
commit
1bea83eb4f
3 changed files with 26 additions and 1 deletions
5
pom.xml
5
pom.xml
|
|
@ -69,6 +69,11 @@
|
|||
<artifactId>kotlin-reflect</artifactId>
|
||||
<version>1.8.21</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
||||
<version>2.5.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
|||
18
src/main/java/tf/lehub/kaamelott/config/OpenApiConfig.java
Normal file
18
src/main/java/tf/lehub/kaamelott/config/OpenApiConfig.java
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
package tf.lehub.kaamelott.config;
|
||||
|
||||
import io.swagger.v3.oas.models.info.Info;
|
||||
import io.swagger.v3.oas.models.OpenAPI;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class OpenApiConfig {
|
||||
@Bean
|
||||
public OpenAPI kaamelottOpenAPI() {
|
||||
return new OpenAPI()
|
||||
.info(new Info()
|
||||
.title("Kaamelott API")
|
||||
.description("API de gestion des chevaliers, quêtes et participations")
|
||||
.version("Bêta"));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
spring.application.name=Kaamelott
|
||||
spring.application.name=
|
||||
|
||||
springdoc.swagger-ui.path=/swagger-ui.html
|
||||
|
||||
spring.datasource.url=jdbc:mysql://localhost:3306/kaamelott_db
|
||||
spring.datasource.username=root
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue