Created
October 23, 2019 13:43
-
-
Save digimon1740/2e6a7907b3e7c38e9e14662293113c85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@OpenApi( | |
requestBody = OpenApiRequestBody(User::class), | |
responses = [ | |
OpenApiResponse("400", Unit::class), | |
OpenApiResponse("201", Unit::class) | |
] | |
) | |
fun addUserHandler(ctx: Context) { | |
val user = ctx.body() | |
UserRepository.createUser(user) | |
ctx.status(201) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment