Fixed docs for NoContent endpoints
This commit is contained in:
parent
b440af900b
commit
0ec5af11f5
2 changed files with 13 additions and 10 deletions
|
@ -399,16 +399,7 @@
|
||||||
- Status code 204
|
- Status code 204
|
||||||
- Headers: []
|
- Headers: []
|
||||||
|
|
||||||
- Supported content types are:
|
- No response body
|
||||||
|
|
||||||
- `application/json;charset=utf-8`
|
|
||||||
- `application/json`
|
|
||||||
|
|
||||||
- Example (`application/json;charset=utf-8`, `application/json`):
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
## GET /raw
|
## GET /raw
|
||||||
|
|
||||||
|
|
|
@ -862,6 +862,18 @@ instance {-# OVERLAPPABLE #-}
|
||||||
status = fromInteger $ natVal (Proxy :: Proxy status)
|
status = fromInteger $ natVal (Proxy :: Proxy status)
|
||||||
p = Proxy :: Proxy a
|
p = Proxy :: Proxy a
|
||||||
|
|
||||||
|
instance (ReflectMethod method) =>
|
||||||
|
HasDocs (NoContentVerb method) where
|
||||||
|
docsFor Proxy (endpoint, action) DocOptions{..} =
|
||||||
|
single endpoint' action'
|
||||||
|
|
||||||
|
where endpoint' = endpoint & method .~ method'
|
||||||
|
action' = action & response.respStatus .~ 204
|
||||||
|
& response.respTypes .~ []
|
||||||
|
& response.respBody .~ []
|
||||||
|
& response.respHeaders .~ []
|
||||||
|
method' = reflectMethod (Proxy :: Proxy method)
|
||||||
|
|
||||||
-- | TODO: mention the endpoint is streaming, its framing strategy
|
-- | TODO: mention the endpoint is streaming, its framing strategy
|
||||||
--
|
--
|
||||||
-- Also there are no samples.
|
-- Also there are no samples.
|
||||||
|
|
Loading…
Add table
Reference in a new issue