package dp.kotul.starter.global

import io.swagger.annotations.ApiResponse
import io.swagger.annotations.ApiResponses

const val API_RESPONSE_OK = "Valid request"
const val API_RESPONSE_BAD_REQUEST = "Bad request, most likely caused by invalid request params"
const val API_RESPONSE_UNAUTHORIZED = "Invalid authorization bearer token"
const val API_RESPONSE_FORBIDDEN = "User does not have rights to view or edit current content"
const val API_RESPONSE_NOT_FOUND = "Object not found"
const val API_RESPONSE_INTERNAL_SERVER_ERROR = "Internal server error"

@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
@ApiResponses(
    ApiResponse(code = 200, message = API_RESPONSE_OK),
    ApiResponse(code = 400, message = API_RESPONSE_BAD_REQUEST),
    ApiResponse(code = 401, message = API_RESPONSE_UNAUTHORIZED),
    ApiResponse(code = 403, message = API_RESPONSE_FORBIDDEN),
    ApiResponse(code = 404, message = API_RESPONSE_NOT_FOUND),
    ApiResponse(code = 500, message = API_RESPONSE_INTERNAL_SERVER_ERROR)
)
annotation class DefaultApiResponses
