added openAPI stuff
This commit is contained in:
parent
a651681c67
commit
035eb6ffb2
|
@ -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 {
|
|
||||||
|
|
||||||
}
|
|
|
@ -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"))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Reference in a new issue