Skip to content

Commit

Permalink
add dependency and config for openAPI springdoc
Browse files Browse the repository at this point in the history
Philippe Joseph committed Jun 26, 2024
1 parent f3b59f9 commit 4d4971d
Showing 2 changed files with 23 additions and 6 deletions.
11 changes: 5 additions & 6 deletions BankingAppServer/pom.xml
Original file line number Diff line number Diff line change
@@ -130,12 +130,6 @@
<version>2.24.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>6.0.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
@@ -147,6 +141,11 @@
<artifactId>spring-test</artifactId>
<version>6.0.7</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.1.0</version>
</dependency>
</dependencies>

<build>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.simplytest.server.config;

import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OpenApiConfig {
@Bean
public OpenAPI customOpenAPI() {
return new OpenAPI()
.components(new Components())
.info(new Info().title("Contact Application API").description(
"This is a sample Spring Boot RESTful service using springdoc-openapi and OpenAPI 3."));
}
}

0 comments on commit 4d4971d

Please sign in to comment.