* use Capture Description if available * update golden/comprehensive.md This is technically a breaking change, because if a Capture has both a Description and a ToCapture instance, the Description now takes precedence. Since this Description wasn't doing anything before, I am guessing that most projects currently only use Description to describe their endpoints and not their Captures, and thus that few people will be affected by this breaking change. * test the "no ToCapture instance" case The case in which there is both a Description and a ToCapture instance seems like a corner case. The more interesting cases are the one in which there is a Description but no ToCapture instance, and the case in which there is a ToCapture instance but no description.
8.2 KiB
GET /
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
GET /alternative/left
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
GET /alternative/right
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
GET /capture/:bar
Captures:
- bar: example description
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
GET /capture-all/:foo
Captures:
- foo: Capture all 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
):
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
):
GET /description
foo
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
GET /flag
GET Parameters:
- foo
- Description: QueryFlag
- This parameter is a flag. This means no value is expected to be associated to this parameter.
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
GET /foo
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
GET /fragment
Fragment:
- foo: Fragment 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
):
GET /get-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
):
17
GET /header
Headers:
- This endpoint is sensitive to the value of the foo HTTP header.
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
GET /header-lenient
Headers:
- This endpoint is sensitive to the value of the bar HTTP header.
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
GET /http-version
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
GET /is-secure
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
GET /named-context
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
GET /param
GET Parameters:
- foo
- Values: 1, 2, 3
- Description: QueryParams 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
):
GET /param-lenient
GET Parameters:
- bar
- Values: 1, 2, 3
- Description: QueryParams 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
):
GET /params
GET Parameters:
- foo
- Values: 1, 2, 3
- Description: QueryParams Int
- This parameter is a list. All GET parameters with the name foo[] will forward their values in a list to the handler.
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
POST /post-int
Response:
-
Status code 204
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
17
POST /post-no-content
Response:
-
Status code 204
-
Headers: []
-
No response body
GET /raw
Response:
-
Status code 200
-
Headers: []
-
No response body
GET /remote-host
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
GET /req-body
Request:
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
17
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
GET /req-body-lenient
Request:
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
17
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
GET /res-headers
Response:
-
Status code 200
-
Headers: [("foo","17")]
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
GET /streaming
Request:
-
Supported content types are:
application/json;charset=utf-8
application/json
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
No response body
GET /summary
foo
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):
GET /vault
Response:
-
Status code 200
-
Headers: []
-
Supported content types are:
application/json;charset=utf-8
application/json
-
Example (
application/json;charset=utf-8
,application/json
):