Skip to content

Commit b767364

Browse files
committed
docs: Add a sentence in the responses section
1 parent 0228b22 commit b767364

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ fun Route.ordersRouting() {
146146

147147
### Responses
148148
Defining response schemas and their corresponding HTTP status codes are done via `@KtorResponds` annotation on an endpoint.
149+
`Nothing` is treated specially and will result in empty response body.
149150

150151
```kotlin
151152
@GenerateOpenApi
@@ -154,6 +155,7 @@ fun Route.ordersRouting() {
154155
@KtorResponds(
155156
[
156157
ResponseEntry("200", Order::class, description = "Created order"),
158+
ResponseEntry("204", Nothing::class),
157159
ResponseEntry("400", ErrorResponseSample::class, description = "Invalid order payload")
158160
]
159161
)

0 commit comments

Comments
 (0)