Skip to content

Instantly share code, notes, and snippets.

@elgalu
Last active June 10, 2016 07:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elgalu/7af6379c9d0c935bf34759805b73fc29 to your computer and use it in GitHub Desktop.
Save elgalu/7af6379c9d0c935bf34759805b73fc29 to your computer and use it in GitHub Desktop.
# https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#exampleObject
responses:
"200":
description: |-
200 300 response
examples:
application/json: |-
{
"versions": [
{
"status": "CURRENT",
"updated": "2011-01-21T11:33:21Z",
"id": "v2.0",
"links": [
{
"href": "http://127.0.0.1:8774/v2/",
"rel": "self"
}
]
},
{
"status": "EXPERIMENTAL",
"updated": "2013-07-23T11:33:21Z",
"id": "v3.0",
"links": [
{
"href": "http://127.0.0.1:8774/v3/",
"rel": "self"
}
]
}
]
}
# Note this `x-request` and `x-response` doesn't exist yet
responses:
"200":
description: |-
200 300 response
examples:
x-request:
application/json:
filter: all
x-response:
application/json:
versions:
- status: "CURRENT"
updated: "2011-01-21T11:33:21Z"
id: "v2.0"
links:
- href: "http://127.0.0.1:8774/v2/"
rel: "self"
- status: "EXPERIMENTAL"
updated: "2013-07-23T11:33:21Z"
id: "v3.0"
links:
- href: "http://127.0.0.1:8774/v3/"
rel: "self"
# https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#exampleObject
# Problems with this approach
# * doesn't cover the request params
# * doesn't support provider states / requests-reponse workflows
responses:
"200":
description: |-
200 300 response
examples:
application/json:
versions:
- status: "CURRENT"
updated: "2011-01-21T11:33:21Z"
id: "v2.0"
links:
- href: "http://127.0.0.1:8774/v2/"
rel: "self"
- status: "EXPERIMENTAL"
updated: "2013-07-23T11:33:21Z"
id: "v3.0"
links:
- href: "http://127.0.0.1:8774/v3/"
rel: "self"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment