{
	"openapi": "3.0.0",
	"servers": [
		{
			"url": "http://petstore.swagger.io/v2"
		}
	],
	"info": {
		"description": "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.",
		"version": "1.0.0",
		"title": "OpenAPI Petstore",
		"license": {
			"name": "Apache-2.0",
			"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
		}
	},
	"paths": {
		"/pet": {
			"post": {
				"tags": ["pet"],
				"summary": "Add a new pet to the store",
				"description": "",
				"operationId": "addPet",
				"responses": {
					"405": {
						"description": "Invalid input"
					}
				},
				"requestBody": {
					"$ref": "http://www.example.com/subspec#/components/requestBodies/Pet"
				}
			}
		},
		"/pet/findByStatus": {
			"$ref": "subspec2"
		}
	},
	"x-inlined-refs": {
		"http://www.example.com/subspec": {
			"$id": "http://www.example.com/subspec",
			"components": {
				"requestBodies": {
					"UserArray": {
						"content": {
							"application/json": {
								"schema": {
									"type": "array",
									"items": {
										"$ref": "#/components/schemas/User"
									}
								}
							}
						},
						"description": "List of user object",
						"required": true
					},
					"Pet": {
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Pet"
								}
							},
							"application/xml": {
								"schema": {
									"$ref": "#/components/schemas/Pet"
								}
							}
						},
						"description": "Pet object that needs to be added to the store",
						"required": true
					}
				},
				"securitySchemes": {
					"petstore_auth": {
						"type": "oauth2",
						"flows": {
							"implicit": {
								"authorizationUrl": "http://petstore.swagger.io/api/oauth/dialog",
								"scopes": {
									"write:pets": "modify pets in your account",
									"read:pets": "read your pets"
								}
							}
						}
					},
					"api_key": {
						"type": "apiKey",
						"name": "api_key",
						"in": "header"
					}
				},
				"schemas": {
					"Order": {
						"title": "Pet Order",
						"description": "An order for a pets from the pet store",
						"type": "object",
						"properties": {
							"id": {
								"type": "integer",
								"format": "int64"
							},
							"petId": {
								"type": "integer",
								"format": "int64"
							},
							"quantity": {
								"type": "integer",
								"format": "int32"
							},
							"shipDate": {
								"type": "string",
								"format": "date-time"
							},
							"status": {
								"type": "string",
								"description": "Order Status",
								"enum": ["placed", "approved", "delivered"]
							},
							"complete": {
								"type": "boolean",
								"default": false
							}
						},
						"xml": {
							"name": "Order"
						}
					},
					"Category": {
						"title": "Pet category",
						"description": "A category for a pet",
						"type": "object",
						"properties": {
							"id": {
								"type": "integer",
								"format": "int64"
							},
							"name": {
								"type": "string"
							}
						},
						"xml": {
							"name": "Category"
						}
					},
					"User": {
						"title": "a User",
						"description": "A User who is purchasing from the pet store",
						"type": "object",
						"properties": {
							"id": {
								"type": "integer",
								"format": "int64"
							},
							"username": {
								"type": "string"
							},
							"firstName": {
								"type": "string"
							},
							"lastName": {
								"type": "string"
							},
							"email": {
								"type": "string"
							},
							"password": {
								"type": "string"
							},
							"phone": {
								"type": "string"
							},
							"userStatus": {
								"type": "integer",
								"format": "int32",
								"description": "User Status"
							}
						},
						"xml": {
							"name": "User"
						}
					},
					"Tag": {
						"title": "Pet Tag",
						"description": "A tag for a pet",
						"type": "object",
						"properties": {
							"id": {
								"type": "integer",
								"format": "int64"
							},
							"name": {
								"type": "string"
							}
						},
						"xml": {
							"name": "Tag"
						}
					},
					"Pet": {
						"title": "a Pet",
						"description": "A pet for sale in the pet store",
						"type": "object",
						"required": ["name", "photoUrls"],
						"properties": {
							"id": {
								"type": "integer",
								"format": "int64"
							},
							"category": {
								"$ref": "#/components/schemas/Category"
							},
							"name": {
								"type": "string",
								"example": "doggie"
							},
							"photoUrls": {
								"type": "array",
								"xml": {
									"name": "photoUrl",
									"wrapped": true
								},
								"items": {
									"type": "string"
								}
							},
							"tags": {
								"type": "array",
								"xml": {
									"name": "tag",
									"wrapped": true
								},
								"items": {
									"$ref": "#/components/schemas/Tag"
								}
							},
							"status": {
								"type": "string",
								"description": "pet status in the store",
								"enum": ["available", "pending", "sold"]
							}
						},
						"xml": {
							"name": "Pet"
						}
					},
					"ApiResponse": {
						"title": "An uploaded response",
						"description": "Describes the result of uploading an image resource",
						"type": "object",
						"properties": {
							"code": {
								"type": "integer",
								"format": "int32"
							},
							"type": {
								"type": "string"
							},
							"message": {
								"type": "string"
							}
						}
					}
				}
			}
		},
		"subspec2": {
			"$id": "subspec2",
			"get": {
				"tags": ["pet"],
				"summary": "Finds Pets by status",
				"description": "Multiple status values can be provided with comma separated strings",
				"operationId": "findPetsByStatus",
				"parameters": [
					{
						"name": "status",
						"in": "query",
						"description": "Status values that need to be considered for filter",
						"required": true,
						"style": "form",
						"explode": false,
						"schema": {
							"type": "array",
							"items": {
								"type": "string",
								"enum": ["available", "pending", "sold"],
								"default": "available"
							}
						}
					}
				],
				"responses": {
					"200": {
						"description": "successful operation",
						"content": {
							"application/xml": {
								"schema": {
									"type": "array",
									"items": {
										"$ref": "http://www.example.com/subspec#/components/schemas/Pet"
									}
								}
							},
							"application/json": {
								"schema": {
									"type": "array",
									"items": {
										"$ref": "http://www.example.com/subspec#/components/schemas/Pet"
									}
								}
							}
						}
					},
					"400": {
						"description": "Invalid status value"
					}
				}
			}
		}
	}
}
