Fixed docs for NoContent endpoints

This commit is contained in:
Catherine Galkina 2019-09-07 18:14:07 +03:00 committed by Oleg Grenrus
parent b440af900b
commit 0ec5af11f5
2 changed files with 13 additions and 10 deletions

View file

@ -399,16 +399,7 @@
- Status code 204
- Headers: []
- Supported content types are:
- `application/json;charset=utf-8`
- `application/json`
- Example (`application/json;charset=utf-8`, `application/json`):
```javascript
```
- No response body
## GET /raw

View file

@ -862,6 +862,18 @@ instance {-# OVERLAPPABLE #-}
status = fromInteger $ natVal (Proxy :: Proxy status)
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
--
-- Also there are no samples.