Merge pull request 'updated OpenAPIConfiguration.java and hopefully added cache' (#14) from worky into dev
All checks were successful
build and publish docker image / deploy / build (push) Successful in 1m51s

Reviewed-on: #14
Reviewed-by: Seiwy <bmate20050911@gmail.com>
This commit is contained in:
Seiwy 2024-06-05 09:06:52 +02:00
commit ac91526bc6
2 changed files with 35 additions and 0 deletions

View file

@ -32,6 +32,7 @@ jobs:
with: with:
java-version: "22" java-version: "22"
distribution: "temurin" distribution: "temurin"
cache: maven
- name: Setup maven - name: Setup maven
if: steps.maven-cache.outputs.cache-hit != 'true' if: steps.maven-cache.outputs.cache-hit != 'true'

View file

@ -0,0 +1,34 @@
package com.learningpulse.dummy.config;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.servers.Server;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Configuration
public class OpenAPIConfiguration {
@Bean
public OpenAPI dummyOpenAPI() {
return new OpenAPI()
.servers(
List.of(
new Server().url("https://lpdev.4o1x5.dev").description("Development server")
)
)
.info(new Info()
.title("Learning Pulse API documentation")
.version("0.0.1")
.description("This is the API documentation for the dummy microservice.")
.contact(new Contact()
.name("Learning Pulse")
.url("https://git.4o1x5.dev/LearningPulse"))
);
}
}