added openAPI stuff

This commit is contained in:
hirst 2024-05-27 17:21:08 +02:00
parent a651681c67
commit 035eb6ffb2
2 changed files with 25 additions and 15 deletions

View file

@ -1,15 +0,0 @@
package com.learningpulse.gateway.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.function.RouterFunction;
import org.springframework.web.servlet.function.ServerResponse;
import org.springframework.web.servlet.function.RouterFunctions;
// TODO copy lambda code lol
@Configuration(proxyBeanMethods = false)
public class Appconfig {
}

View file

@ -0,0 +1,25 @@
package com.learningpulse.gateway.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 org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
@Component
@Configuration
public class OpenAPIConfiguration {
@Bean
public OpenAPI gatewayOpenAPI() {
return new OpenAPI().info(new Info()
.title("Learning Pulse API documentation")
.version("0.0.1")
.description("This is the API documentation for the Learning Pulse project.")
.contact(new Contact()
.name("Learning Pulse")
.url("https://git.4o1x5.dev/LearningPulse"))
);
}
}