From 6cbf0d38914522bc5652998c86fcef1de4cb89a5 Mon Sep 17 00:00:00 2001 From: jschaul Date: Wed, 20 Mar 2019 12:34:02 +0100 Subject: [PATCH] add route to comprehensive API --- servant-docs/golden/comprehensive.md | 22 ++++++++++++++++++++ servant/src/Servant/Test/ComprehensiveAPI.hs | 1 + 2 files changed, 23 insertions(+) diff --git a/servant-docs/golden/comprehensive.md b/servant-docs/golden/comprehensive.md index 9239726c..2277af31 100644 --- a/servant-docs/golden/comprehensive.md +++ b/servant-docs/golden/comprehensive.md @@ -96,6 +96,28 @@ ``` +## GET /capture-lenient/:foo + +### Captures: + +- *foo*: Capture foo Int + +### Response: + +- Status code 200 +- Headers: [] + +- Supported content types are: + + - `application/json;charset=utf-8` + - `application/json` + +- Example (`application/json;charset=utf-8`, `application/json`): + +```javascript + +``` + ## GET /description ### foo diff --git a/servant/src/Servant/Test/ComprehensiveAPI.hs b/servant/src/Servant/Test/ComprehensiveAPI.hs index 51721c3a..76800be4 100644 --- a/servant/src/Servant/Test/ComprehensiveAPI.hs +++ b/servant/src/Servant/Test/ComprehensiveAPI.hs @@ -49,6 +49,7 @@ type ComprehensiveAPIWithoutStreamingOrRaw' endpoint = GET :<|> "get-int" :> Get '[JSON] Int :<|> "capture" :> Capture' '[Description "example description"] "foo" Int :> GET + :<|> "capture-lenient" :> Capture' '[Lenient] "foo" Int :> GET :<|> "header" :> Header "foo" Int :> GET :<|> "header-lenient" :> Header' '[Required, Lenient] "bar" Int :> GET :<|> "http-version" :> HttpVersion :> GET