You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
707 B
27 lines
707 B
package allin.routing
|
|
|
|
import allin.model.ApiMessage
|
|
import io.github.smiley4.ktorswaggerui.dsl.get
|
|
import io.ktor.http.*
|
|
import io.ktor.server.application.*
|
|
import io.ktor.server.response.*
|
|
import io.ktor.server.routing.*
|
|
|
|
|
|
fun Application.basicRouter() {
|
|
routing {
|
|
get("/", {
|
|
description = "Hello World of Allin API"
|
|
response {
|
|
HttpStatusCode.OK to {
|
|
description = "Successful Request"
|
|
}
|
|
HttpStatusCode.InternalServerError to {
|
|
description = "Something unexpected happened"
|
|
}
|
|
}
|
|
}) {
|
|
call.respond(ApiMessage.WELCOME)
|
|
}
|
|
}
|
|
} |