Optimize annotation in controller
This commit is contained in:
23
src/main/kotlin/top/fatweb/api/annotation/ApiController.kt
Normal file
23
src/main/kotlin/top/fatweb/api/annotation/ApiController.kt
Normal file
@@ -0,0 +1,23 @@
|
||||
package top.fatweb.api.annotation
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag
|
||||
import org.springframework.core.annotation.AliasFor
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@Tag(name = "")
|
||||
@RequestMapping
|
||||
@RestController
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class ApiController(
|
||||
val version: Int = 1,
|
||||
|
||||
@get:AliasFor(annotation = RestController::class, attribute = "value") val value: String = "",
|
||||
|
||||
@get:AliasFor(annotation = RequestMapping::class, attribute = "path") val path: Array<String> = [""],
|
||||
|
||||
@get:AliasFor(annotation = Tag::class, attribute = "name") val name: String,
|
||||
|
||||
@get:AliasFor(annotation = Tag::class, attribute = "description") val description: String
|
||||
)
|
||||
Reference in New Issue
Block a user