Change namespace to top.fatweb.oxygen.api
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package top.fatweb.oxygen.api.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 top.fatweb.oxygen.api.properties.ServerProperties
|
||||
|
||||
/**
|
||||
* Swagger API doc configuration
|
||||
*
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
class SwaggerConfig {
|
||||
@Bean
|
||||
fun customOpenAPI(): OpenAPI? {
|
||||
val contact = Contact().name("FatttSnake").url("https://fatweb.top").email("fatttsnake@gmail.com")
|
||||
return OpenAPI().info(
|
||||
Info().title("Oxygen API 文档").description("Oxygen 后端 API 文档,包含各个 Controller 调用信息")
|
||||
.contact(contact).version(
|
||||
ServerProperties.version
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user