{
  "swagger": "2.0",
  "info": {
    "description": "This is a sample server Petstore server.",
    "title": "Swagger Example API",
    "termsOfService": "http://swagger.io/terms/",
    "contact": {
      "name": "API Support",
      "url": "http://www.swagger.io/support",
      "email": "support@swagger.io"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version": "1.0"
  },
  "host": "petstore.swagger.io",
  "basePath": "/v2",
  "paths": {
    "/AnonymousField": {
      "get": {
        "summary": "use Anonymous field",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/web.RevValue"
            }
          }
        }
      }
    },
    "/AnonymousStructArray": {
      "get": {
        "summary": "Use AnonymousStructArray",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "foo": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/CrossAlias": {
      "get": {
        "summary": "Use CrossAlias",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/web.CrossAlias"
            }
          }
        }
      }
    },
    "/GetPet5a": {
      "options": {
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/web.Pet5a"
            }
          }
        }
      }
    },
    "/GetPet5b": {
      "head": {
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/web.Pet5b"
            }
          }
        }
      }
    },
    "/GetPet5c": {
      "patch": {
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/web.Pet5c"
            }
          }
        }
      }
    },
    "/GetPet6FunctionScopedComplexResponse": {
      "get": {
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/api.GetPet6FunctionScopedComplexResponse.response"
            }
          }
        }
      }
    },
    "/GetPet6FunctionScopedResponse": {
      "get": {
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/api.GetPet6FunctionScopedResponse.response"
            }
          }
        }
      }
    },
    "/GetPet6MapString": {
      "get": {
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/IndirectRecursiveTest": {
      "get": {
        "summary": "Use IndirectRecursiveTest",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/web.IndirectRecursiveTest"
            }
          }
        }
      }
    },
    "/Pet2": {
      "get": {
        "summary": "use pet2",
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "$ref": "#/definitions/web.Pet2"
            }
          }
        }
      }
    },
    "/Tags": {
      "get": {
        "summary": "Use Tags",
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/web.Tag"
              }
            }
          }
        }
      }
    },
    "/file/upload": {
      "post": {
        "description": "Upload file",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "application/json"
        ],
        "summary": "Upload file",
        "operationId": "file.upload",
        "parameters": [
          {
            "type": "file",
            "description": "this is a test file",
            "name": "file",
            "in": "formData",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "string"
            }
          },
          "400": {
            "description": "We need ID!!",
            "schema": {
              "$ref": "#/definitions/web.APIError"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "403": {
            "description": "cross",
            "schema": {
              "$ref": "#/definitions/cross.Cross"
            }
          },
          "404": {
            "description": "Can not find ID",
            "schema": {
              "$ref": "#/definitions/web.APIError"
            }
          }
        }
      }
    },
    "/testapi/get-string-by-int/{some_id}": {
      "get": {
        "description": "get string by ID",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "summary": "Add a new pet to the store",
        "operationId": "get-string-by-int",
        "parameters": [
          {
            "type": "integer",
            "format": "int64",
            "description": "Some ID",
            "name": "some_id",
            "in": "path",
            "required": true
          },
          {
            "description": "Some ID",
            "name": "some_id",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/web.Pet"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "string"
            }
          },
          "400": {
            "description": "We need ID!!",
            "schema": {
              "$ref": "#/definitions/web.APIError"
            }
          },
          "404": {
            "description": "Can not find ID",
            "schema": {
              "$ref": "#/definitions/web.APIError"
            }
          }
        }
      }
    },
    "/testapi/get-struct-array-by-string/{some_id}": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BasicAuth": []
          },
          {
            "OAuth2Application": [
              "write"
            ]
          },
          {
            "OAuth2Implicit": [
              "read",
              "admin"
            ]
          },
          {
            "OAuth2AccessCode": [
              "read"
            ]
          },
          {
            "OAuth2Password": [
              "admin"
            ]
          },
          {
            "Firebase": [],
            "OAuth2Implicit": [
              "read",
              "write"
            ]
          }
        ],
        "description": "get struct array by ID",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "operationId": "get-struct-array-by-string",
        "parameters": [
          {
            "type": "string",
            "description": "Some ID",
            "name": "some_id",
            "in": "path",
            "required": true
          },
          {
            "enum": [
              1,
              2,
              3
            ],
            "type": "integer",
            "description": "Category",
            "name": "category",
            "in": "query",
            "required": true
          },
          {
            "minimum": 0,
            "type": "integer",
            "default": 0,
            "description": "Offset",
            "name": "offset",
            "in": "query",
            "required": true
          },
          {
            "maximum": 50,
            "type": "integer",
            "default": 10,
            "description": "Limit",
            "name": "limit",
            "in": "query",
            "required": true
          },
          {
            "maxLength": 50,
            "minLength": 1,
            "type": "string",
            "default": "\"\"",
            "description": "q",
            "name": "q",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "ok",
            "schema": {
              "type": "string"
            }
          },
          "400": {
            "description": "We need ID!!",
            "schema": {
              "$ref": "#/definitions/web.APIError"
            }
          },
          "404": {
            "description": "Can not find ID",
            "schema": {
              "$ref": "#/definitions/web.APIError"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "api.GetPet6FunctionScopedComplexResponse.pet": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string"
        }
      }
    },
    "api.GetPet6FunctionScopedComplexResponse.pointerPet": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string"
        }
      }
    },
    "api.GetPet6FunctionScopedComplexResponse.response": {
      "type": "object",
      "properties": {
        "Pets": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/api.GetPet6FunctionScopedComplexResponse.pet"
          }
        },
        "PointerPet": {
          "$ref": "#/definitions/api.GetPet6FunctionScopedComplexResponse.pointerPet"
        }
      }
    },
    "api.GetPet6FunctionScopedResponse.response": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string"
        }
      }
    },
    "cross.Cross": {
      "type": "object",
      "properties": {
        "Array": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "String": {
          "type": "string"
        }
      }
    },
    "web.APIError": {
      "type": "object",
      "properties": {
        "CreatedAt": {
          "type": "string"
        },
        "ErrorCode": {
          "type": "integer"
        },
        "ErrorMessage": {
          "type": "string"
        }
      }
    },
    "web.CrossAlias": {
      "type": "object",
      "properties": {
        "Array": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "String": {
          "type": "string"
        }
      }
    },
    "web.IndirectRecursiveTest": {
      "type": "object",
      "properties": {
        "Tags": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/web.Tag"
          }
        }
      }
    },
    "web.Pet": {
      "type": "object",
      "required": [
        "name",
        "photo_urls"
      ],
      "properties": {
        "category": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "example": 1
            },
            "name": {
              "type": "string",
              "example": "category_name"
            },
            "photo_urls": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "url"
              },
              "example": [
                "http://test/image/1.jpg",
                "http://test/image/2.jpg"
              ]
            },
            "small_category": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "id": {
                  "type": "integer",
                  "example": 1
                },
                "name": {
                  "type": "string",
                  "maxLength": 16,
                  "minLength": 4,
                  "example": "detail_category_name"
                },
                "photo_urls": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "example": [
                    "http://test/image/1.jpg",
                    "http://test/image/2.jpg"
                  ]
                }
              }
            }
          }
        },
        "data": {},
        "decimal": {
          "type": "number"
        },
        "enum_array": {
          "type": "array",
          "items": {
            "type": "integer",
            "enum": [
              1,
              2,
              3,
              5,
              7
            ]
          }
        },
        "food_brands": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "x-some-extension": true
        },
        "food_types": {
          "type": "array",
          "items": {
            "type": "integer",
            "enum": [
              0,
              1,
              2
            ],
            "x-enum-varnames": [
              "Wet",
              "Dry",
              "Raw"
            ]
          },
          "x-some-extension": true
        },
        "id": {
          "type": "integer",
          "format": "int64",
          "readOnly": true,
          "example": 1
        },
        "int_array": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "example": [
            1,
            2
          ]
        },
        "is_alive": {
          "type": "boolean",
          "default": true,
          "example": true
        },
        "name": {
          "type": "string",
          "example": "poti"
        },
        "pets": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/web.Pet2"
          }
        },
        "pets2": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/web.Pet2"
          }
        },
        "photo_urls": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "example": [
            "http://test/image/1.jpg",
            "http://test/image/2.jpg"
          ]
        },
        "price": {
          "type": "number",
          "maximum": 1000,
          "minimum": 1,
          "multipleOf": 0.01,
          "example": 3.25
        },
        "single_enum_varname": {
          "type": "integer",
          "enum": [
            1,
            2,
            3
          ],
          "x-enum-varnames": [
            "one",
            "two",
            "three"
          ],
          "x-some-extension": true
        },
        "status": {
          "type": "string",
          "enum": [
            "healthy",
            "ill"
          ]
        },
        "string_map": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "example": {
            "key1": "value",
            "key2": "value2"
          }
        },
        "tags": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/web.Tag"
          }
        },
        "uuid": {
          "type": "string"
        }
      }
    },
    "web.Pet2": {
      "type": "object",
      "properties": {
        "deleted_at": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "middlename": {
          "type": "string",
          "x-abc": "def",
          "x-nullable": true,
          "x-omitempty": false
        }
      }
    },
    "web.Pet5a": {
      "type": "object",
      "required": [
        "name",
        "odd"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "odd": {
          "type": "boolean"
        }
      }
    },
    "web.Pet5b": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string"
        }
      }
    },
    "web.Pet5c": {
      "type": "object",
      "required": [
        "name",
        "odd"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "odd": {
          "type": "boolean"
        }
      }
    },
    "web.RevValue": {
      "type": "object",
      "properties": {
        "Data": {
          "type": "integer"
        },
        "cross": {
          "$ref": "#/definitions/cross.Cross"
        },
        "crosses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/cross.Cross"
          }
        },
        "rev_value_base": {
          "$ref": "#/definitions/web.RevValueBase"
        }
      }
    },
    "web.RevValueBase": {
      "type": "object",
      "properties": {
        "Err": {
          "type": "integer"
        },
        "Status": {
          "type": "boolean"
        }
      }
    },
    "web.Tag": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string"
        },
        "pets": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/web.Pet"
          }
        }
      }
    }
  },
  "securityDefinitions": {
    "ApiKeyAuth": {
      "type": "apiKey",
      "name": "Authorization",
      "in": "header"
    },
    "BasicAuth": {
      "type": "basic"
    },
    "OAuth2AccessCode": {
      "type": "oauth2",
      "flow": "accessCode",
      "authorizationUrl": "https://example.com/oauth/authorize",
      "tokenUrl": "https://example.com/oauth/token",
      "scopes": {
        "admin": "Grants read and write access to administrative information"
      }
    },
    "OAuth2Application": {
      "type": "oauth2",
      "flow": "application",
      "tokenUrl": "https://example.com/oauth/token",
      "scopes": {
        "admin": "Grants read and write access to administrative information",
        "write": "Grants write access"
      }
    },
    "OAuth2Implicit": {
      "type": "oauth2",
      "flow": "implicit",
      "authorizationUrl": "https://example.com/oauth/authorize",
      "scopes": {
        "admin": "Grants read and write access to administrative information",
        "write": "Grants write access"
      }
    },
    "OAuth2Password": {
      "type": "oauth2",
      "flow": "password",
      "tokenUrl": "https://example.com/oauth/token",
      "scopes": {
        "admin": "Grants read and write access to administrative information",
        "read": "Grants read access",
        "write": "Grants write access"
      }
    }
  }
}