mirror of
https://github.com/Redocly/redoc.git
synced 2025-02-07 05:20:32 +03:00
Extend petstore schema to demonstrate extraction global concerns
This commit is contained in:
parent
0e2b8aa6f5
commit
a64c34cfa7
|
@ -16,6 +16,21 @@
|
|||
"host": "petstore.swagger.io",
|
||||
"basePath": "/v2",
|
||||
"tags": [{
|
||||
"name": "Pagination",
|
||||
"description": "Sometimes you just can't get enough. For this reason, we've provided a convenient way to access more data in any request for sequential data. Simply call the url in the next_url parameter and we'll respond with the next set of data.\n```json\n{\n ...\n \"pagination\": {\n \"next_url\": \"https://api.instagram.com/v1/tags/puppy/media/recent?access_token=fb2e77d.47a0479900504cb3ab4a1f626d174d2d&max_id=13872296\",\n \"next_max_id\": \"13872296\"\n }\n}\n```\n On views where pagination is present, we also support the `count` parameter. Simply set this to the number of items you'd like to receive. Note that the default values should be fine for most applications - but if you decide to increase this number there is a maximum value defined on each endpoint.",
|
||||
"externalDocs": {
|
||||
"description": "Find out more",
|
||||
"url": "http://swagger.io"
|
||||
}
|
||||
},{
|
||||
"name": "JSONP",
|
||||
"x-secondaryTag": true,
|
||||
"description": "If you're writing an AJAX application, and you'd like to wrap our response with a callback, all you have to do is specify a callback parameter with any API call:\n```\n https://api.instagram.com/v1/tags/coffee/media/recent?access_token=fb2e77d.47a0479900504cb3ab4a1f626d174d2d&callback=callbackFunction\n```\nWould respond with:\n```js\ncallbackFunction({\n ...\n});\n```",
|
||||
"externalDocs": {
|
||||
"description": "Find out more",
|
||||
"url": "http://swagger.io"
|
||||
}
|
||||
},{
|
||||
"name": "pet",
|
||||
"description": "Everything about your Pets",
|
||||
"externalDocs": {
|
||||
|
@ -95,7 +110,7 @@
|
|||
},
|
||||
"/pet/findByStatus": {
|
||||
"get": {
|
||||
"tags": ["pet"],
|
||||
"tags": ["pet", "Pagination", "JSONP"],
|
||||
"summary": "Finds Pets by status",
|
||||
"description": "Multiple status values can be provided with comma seperated strings",
|
||||
"operationId": "findPetsByStatus",
|
||||
|
@ -134,7 +149,7 @@
|
|||
},
|
||||
"/pet/findByTags": {
|
||||
"get": {
|
||||
"tags": ["pet"],
|
||||
"tags": ["pet", "Pagination", "JSONP"],
|
||||
"summary": "Finds Pets by tags",
|
||||
"description": "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
|
||||
"operationId": "findPetsByTags",
|
||||
|
@ -171,7 +186,7 @@
|
|||
},
|
||||
"/pet/{petId}": {
|
||||
"get": {
|
||||
"tags": ["pet"],
|
||||
"tags": ["pet", "JSONP"],
|
||||
"summary": "Find pet by ID",
|
||||
"description": "Returns a single pet",
|
||||
"operationId": "getPetById",
|
||||
|
@ -310,7 +325,7 @@
|
|||
},
|
||||
"/store/inventory": {
|
||||
"get": {
|
||||
"tags": ["store"],
|
||||
"tags": ["store", "JSONP"],
|
||||
"summary": "Returns pet inventories by status",
|
||||
"description": "Returns a map of status codes to quantities",
|
||||
"operationId": "getInventory",
|
||||
|
@ -364,7 +379,7 @@
|
|||
},
|
||||
"/store/order/{orderId}": {
|
||||
"get": {
|
||||
"tags": ["store"],
|
||||
"tags": ["store", "JSONP"],
|
||||
"summary": "Find purchase order by ID",
|
||||
"description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions",
|
||||
"operationId": "getOrderById",
|
||||
|
@ -555,7 +570,7 @@
|
|||
},
|
||||
"/user/{username}": {
|
||||
"get": {
|
||||
"tags": ["user"],
|
||||
"tags": ["user", "JSONP"],
|
||||
"summary": "Get user by user name",
|
||||
"description": "",
|
||||
"operationId": "getUserByName",
|
||||
|
|
Loading…
Reference in New Issue
Block a user