Adds application/json to inspect type (#853)
This commit is contained in:
committed by
Joe Nelson
parent
10f6ce45db
commit
0cf49bb8b6
@@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Allow requesting binary output on GET - @steve-chavez
|
- Allow requesting binary output on GET - @steve-chavez
|
||||||
|
- Accept clients requesting `Content-Type: application/json` from / - @feynmanliang
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ responseContentTypeOrError accepts action = serves contentTypesForRequest accept
|
|||||||
ActionUpdate -> [CTApplicationJSON, CTSingularJSON, CTTextCSV]
|
ActionUpdate -> [CTApplicationJSON, CTSingularJSON, CTTextCSV]
|
||||||
ActionDelete -> [CTApplicationJSON, CTSingularJSON, CTTextCSV]
|
ActionDelete -> [CTApplicationJSON, CTSingularJSON, CTTextCSV]
|
||||||
ActionInvoke -> [CTApplicationJSON, CTSingularJSON]
|
ActionInvoke -> [CTApplicationJSON, CTSingularJSON]
|
||||||
ActionInspect -> [CTOpenAPI]
|
ActionInspect -> [CTOpenAPI, CTApplicationJSON]
|
||||||
ActionInfo -> [CTTextCSV]
|
ActionInfo -> [CTTextCSV]
|
||||||
serves sProduces cAccepts =
|
serves sProduces cAccepts =
|
||||||
case mutuallyAgreeable sProduces cAccepts of
|
case mutuallyAgreeable sProduces cAccepts of
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ makeRootPathItem = ("/", p)
|
|||||||
where
|
where
|
||||||
getOp = (mempty :: Operation)
|
getOp = (mempty :: Operation)
|
||||||
& tags .~ Set.fromList ["/"]
|
& tags .~ Set.fromList ["/"]
|
||||||
& produces ?~ makeMimeList [CTOpenAPI]
|
& produces ?~ makeMimeList [CTOpenAPI, CTApplicationJSON]
|
||||||
& at 200 ?~ "OK"
|
& at 200 ?~ "OK"
|
||||||
pr = (mempty :: PathItem) & get ?~ getOp
|
pr = (mempty :: PathItem) & get ?~ getOp
|
||||||
p = pr
|
p = pr
|
||||||
|
|||||||
Reference in New Issue
Block a user