{
  "swagger": "2.0",
  "info": {
    "title": "Swagger Petstore",
    "description": "This is a sample server Petstore server.  You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger.  For this sample, you can use the api key \"special-key\" to test the authorization filters",
    "version": "1.0.0"
  },
  "produces": ["application/json"],
  "host": "localhost:8080",
  "basePath": "/v2",
  "paths": {
  
  "/user/createWithList": {
    
    "post": {
      "summary": "Creates list of users with given input array",
      "description":"",
      "x-swagger-router-controller": "User",
      "tags": ["User"],
      "operationId": "createUsersWithListInput",
      "parameters": [
        {
  "in" : "body",
  "name" : "body",
  "description" : "List of user object",
  "required" : false,
  "schema" : {
    "type" : "array",
    "items" : {
      "$ref" : "#/definitions/User"
    }
  }
}
        
      ],
      "responses": {
        "default": {
  "description" : "successful operation"
}
        
        
      }
    } 
    
  } ,
  
  "/user/createWithArray": {
    
    "post": {
      "summary": "Creates list of users with given input array",
      "description":"",
      "x-swagger-router-controller": "User",
      "tags": ["User"],
      "operationId": "createUsersWithArrayInput",
      "parameters": [
        {
  "in" : "body",
  "name" : "body",
  "description" : "List of user object",
  "required" : false,
  "schema" : {
    "type" : "array",
    "items" : {
      "$ref" : "#/definitions/User"
    }
  }
}
        
      ],
      "responses": {
        "default": {
  "description" : "successful operation"
}
        
        
      }
    } 
    
  } ,
  
  "/user/{username}": {
    
    "get": {
      "summary": "Get user by user name",
      "description":"",
      "x-swagger-router-controller": "User",
      "tags": ["User"],
      "operationId": "getUserByName",
      "parameters": [
        {
  "name" : "username",
  "in" : "path",
  "description" : "The name that needs to be fetched. Use user1 for testing. ",
  "required" : true,
  "type" : "string"
}
        
      ],
      "responses": {
        "404": {
  "description" : "User not found"
}
        ,
        "200": {
  "description" : "successful operation",
  "schema" : {
    "$ref" : "#/definitions/User"
  },
  "examples" : {
    "application/json" : {
      "id" : 1,
      "username" : "johnp",
      "firstName" : "John",
      "lastName" : "Public",
      "email" : "johnp@swagger.io",
      "password" : "-secret-",
      "phone" : "0123456789",
      "userStatus" : 0
    }
  }
}
        ,
        "400": {
  "description" : "Invalid username supplied"
}
        
        
      }
    } ,
    
    "put": {
      "summary": "Updated user",
      "description":"This can only be done by the logged in user.",
      "x-swagger-router-controller": "User",
      "tags": ["User"],
      "operationId": "updateUser",
      "parameters": [
        {
  "name" : "username",
  "in" : "path",
  "description" : "name that need to be deleted",
  "required" : true,
  "type" : "string"
},
        {
  "in" : "body",
  "name" : "body",
  "description" : "Updated user object",
  "required" : false,
  "schema" : {
    "$ref" : "#/definitions/User"
  }
}
        
      ],
      "responses": {
        "404": {
  "description" : "User not found"
}
        ,
        "400": {
  "description" : "Invalid user supplied"
}
        
        
      }
    } ,
    
    "delete": {
      "summary": "Delete user",
      "description":"This can only be done by the logged in user.",
      "x-swagger-router-controller": "User",
      "tags": ["User"],
      "operationId": "deleteUser",
      "parameters": [
        {
  "name" : "username",
  "in" : "path",
  "description" : "The name that needs to be deleted",
  "required" : true,
  "type" : "string"
}
        
      ],
      "responses": {
        "404": {
  "description" : "User not found"
}
        ,
        "400": {
  "description" : "Invalid username supplied"
}
        
        
      }
    } 
    
  } ,
  
  "/user": {
    
    "post": {
      "summary": "Create user",
      "description":"This can only be done by the logged in user.",
      "x-swagger-router-controller": "User",
      "tags": ["User"],
      "operationId": "createUser",
      "parameters": [
        {
  "in" : "body",
  "name" : "body",
  "description" : "Created user object",
  "required" : false,
  "schema" : {
    "$ref" : "#/definitions/User"
  }
}
        
      ],
      "responses": {
        "default": {
  "description" : "successful operation"
}
        
        
      }
    } 
    
  } ,
  
  "/user/logout": {
    
    "get": {
      "summary": "Logs out current logged in user session",
      "description":"",
      "x-swagger-router-controller": "User",
      "tags": ["User"],
      "operationId": "logoutUser",
      "responses": {
        "default": {
  "description" : "successful operation"
}
        
        
      }
    } 
    
  } ,
  
  "/user/login": {
    
    "get": {
      "summary": "Logs user into the system",
      "description":"",
      "x-swagger-router-controller": "User",
      "tags": ["User"],
      "operationId": "loginUser",
      "parameters": [
        {
  "name" : "username",
  "in" : "query",
  "description" : "The user name for login",
  "required" : false,
  "type" : "string"
},
        {
  "name" : "password",
  "in" : "query",
  "description" : "The password for login in clear text",
  "required" : false,
  "type" : "string"
}
        
      ],
      "responses": {
        "200": {
  "description" : "successful operation",
  "schema" : {
    "type" : "string"
  }
}
        ,
        "400": {
  "description" : "Invalid username/password supplied"
}
        
        
      }
    } 
    
  } ,
  
  
  "/pet": {
    
    "put": {
      "summary": "Update an existing pet",
      "description":"",
      "x-swagger-router-controller": "Pet",
      "tags": ["Pet"],
      "operationId": "updatePet",
      "parameters": [
        {
  "in" : "body",
  "name" : "body",
  "description" : "Pet object that needs to be added to the store",
  "required" : false,
  "schema" : {
    "$ref" : "#/definitions/Pet"
  }
}
        
      ],
      "responses": {
        "405": {
  "description" : "Validation exception"
}
        ,
        "404": {
  "description" : "Pet not found"
}
        ,
        "400": {
  "description" : "Invalid ID supplied"
}
        
        
      }
    } ,
    
    "post": {
      "summary": "Add a new pet to the store",
      "description":"",
      "x-swagger-router-controller": "Pet",
      "tags": ["Pet"],
      "operationId": "addPet",
      "parameters": [
        {
  "in" : "body",
  "name" : "body",
  "description" : "Pet object that needs to be added to the store",
  "required" : false,
  "schema" : {
    "$ref" : "#/definitions/Pet"
  }
}
        
      ],
      "responses": {
        "405": {
  "description" : "Invalid input"
}
        
        
      }
    } 
    
  } ,
  
  "/pet/{petId}/uploadImage": {
    
    "post": {
      "summary": "uploads an image",
      "description":"",
      "x-swagger-router-controller": "Pet",
      "tags": ["Pet"],
      "operationId": "uploadFile",
      "parameters": [
        {
  "name" : "petId",
  "in" : "path",
  "description" : "ID of pet to update",
  "required" : true,
  "type" : "integer",
  "format" : "int64"
},
        {
  "name" : "additionalMetadata",
  "in" : "formData",
  "description" : "Additional data to pass to server",
  "required" : false,
  "type" : "string"
},
        {
  "name" : "file",
  "in" : "formData",
  "description" : "file to upload",
  "required" : false,
  "type" : "file"
}
        
      ],
      "responses": {
        "default": {
  "description" : "successful operation"
}
        
        
      }
    } 
    
  } ,
  
  "/pet/findByStatus": {
    
    "get": {
      "summary": "Finds Pets by status",
      "description":"Multiple status values can be provided with comma seperated strings",
      "x-swagger-router-controller": "Pet",
      "tags": ["Pet"],
      "operationId": "findPetsByStatus",
      "parameters": [
        {
  "name" : "status",
  "in" : "query",
  "description" : "Status values that need to be considered for filter",
  "required" : false,
  "type" : "array",
  "items" : {
    "type" : "string"
  },
  "collectionFormat" : "multi",
  "default" : "available"
}
        
      ],
      "responses": {
        "200": {
  "description" : "successful operation",
  "schema" : {
    "type" : "array",
    "items" : {
      "$ref" : "#/definitions/Pet"
    }
  }
}
        ,
        "400": {
  "description" : "Invalid status value"
}
        
        
      }
    } 
    
  } ,
  
  "/pet/findByTags": {
    
    "get": {
      "summary": "Finds Pets by tags",
      "description":"Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
      "x-swagger-router-controller": "Pet",
      "tags": ["Pet"],
      "operationId": "findPetsByTags",
      "parameters": [
        {
  "name" : "tags",
  "in" : "query",
  "description" : "Tags to filter by",
  "required" : false,
  "type" : "array",
  "items" : {
    "type" : "string"
  },
  "collectionFormat" : "multi"
}
        
      ],
      "responses": {
        "200": {
  "description" : "successful operation",
  "schema" : {
    "type" : "array",
    "items" : {
      "$ref" : "#/definitions/Pet"
    }
  }
}
        ,
        "400": {
  "description" : "Invalid tag value"
}
        
        
      }
    } 
    
  } ,
  
  "/pet/{petId}": {
    
    "get": {
      "summary": "Find pet by ID",
      "description":"Returns a pet when ID &lt; 10.  ID &gt; 10 or nonintegers will simulate API error conditions",
      "x-swagger-router-controller": "Pet",
      "tags": ["Pet"],
      "operationId": "getPetById",
      "parameters": [
        {
  "name" : "petId",
  "in" : "path",
  "description" : "ID of pet that needs to be fetched",
  "required" : true,
  "type" : "integer",
  "format" : "int64"
}
        
      ],
      "responses": {
        "404": {
  "description" : "Pet not found"
}
        ,
        "200": {
  "description" : "successful operation",
  "schema" : {
    "$ref" : "#/definitions/Pet"
  }
}
        ,
        "400": {
  "description" : "Invalid ID supplied"
}
        
        
      }
    } ,
    
    "post": {
      "summary": "Updates a pet in the store with form data",
      "description":"",
      "x-swagger-router-controller": "Pet",
      "tags": ["Pet"],
      "operationId": "updatePetWithForm",
      "parameters": [
        {
  "name" : "petId",
  "in" : "path",
  "description" : "ID of pet that needs to be updated",
  "required" : true,
  "type" : "string"
},
        {
  "name" : "name",
  "in" : "formData",
  "description" : "Updated name of the pet",
  "required" : false,
  "type" : "string"
},
        {
  "name" : "status",
  "in" : "formData",
  "description" : "Updated status of the pet",
  "required" : false,
  "type" : "string"
}
        
      ],
      "responses": {
        "405": {
  "description" : "Invalid input"
}
        
        
      }
    } ,
    
    "delete": {
      "summary": "Deletes a pet",
      "description":"",
      "x-swagger-router-controller": "Pet",
      "tags": ["Pet"],
      "operationId": "deletePet",
      "parameters": [
        {
  "name" : "petId",
  "in" : "path",
  "description" : "Pet id to delete",
  "required" : true,
  "type" : "integer",
  "format" : "int64"
},
        {
  "name" : "api_key",
  "in" : "header",
  "description" : "",
  "required" : false,
  "type" : "string"
}
        
      ],
      "responses": {
        "400": {
  "description" : "Invalid pet value"
}
        
        
      }
    } 
    
  } ,
  
  
  "/store/order/{orderId}": {
    
    "get": {
      "summary": "Find purchase order by ID",
      "description":"For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions",
      "x-swagger-router-controller": "Store",
      "tags": ["Store"],
      "operationId": "getOrderById",
      "parameters": [
        {
  "name" : "orderId",
  "in" : "path",
  "description" : "ID of pet that needs to be fetched",
  "required" : true,
  "type" : "string"
}
        
      ],
      "responses": {
        "404": {
  "description" : "Order not found"
}
        ,
        "200": {
  "description" : "successful operation",
  "schema" : {
    "$ref" : "#/definitions/Order"
  }
}
        ,
        "400": {
  "description" : "Invalid ID supplied"
}
        
        
      }
    } ,
    
    "delete": {
      "summary": "Delete purchase order by ID",
      "description":"For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors",
      "x-swagger-router-controller": "Store",
      "tags": ["Store"],
      "operationId": "deleteOrder",
      "parameters": [
        {
  "name" : "orderId",
  "in" : "path",
  "description" : "ID of the order that needs to be deleted",
  "required" : true,
  "type" : "string"
}
        
      ],
      "responses": {
        "404": {
  "description" : "Order not found"
}
        ,
        "400": {
  "description" : "Invalid ID supplied"
}
        
        
      }
    } 
    
  } ,
  
  "/store/order": {
    
    "post": {
      "summary": "Place an order for a pet",
      "description":"",
      "x-swagger-router-controller": "Store",
      "tags": ["Store"],
      "operationId": "placeOrder",
      "parameters": [
        {
  "in" : "body",
  "name" : "body",
  "description" : "order placed for purchasing the pet",
  "required" : false,
  "schema" : {
    "$ref" : "#/definitions/Order"
  }
}
        
      ],
      "responses": {
        "200": {
  "description" : "successful operation",
  "schema" : {
    "$ref" : "#/definitions/Order"
  }
}
        ,
        "400": {
  "description" : "Invalid Order"
}
        
        
      }
    } 
    
  } ,
  
  "/store/inventory": {
    
    "get": {
      "summary": "Returns pet inventories by status",
      "description":"Returns a map of status codes to quantities",
      "x-swagger-router-controller": "Store",
      "tags": ["Store"],
      "operationId": "getInventory",
      "responses": {
        "200": {
  "description" : "successful operation",
  "schema" : {
    "type" : "object",
    "additionalProperties" : {
      "type" : "integer",
      "format" : "int32"
    }
  }
}
        
        
      }
    } 
    
  } 
  
  }, "definitions": {
  "User": {
  "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"
  }
},"Category": {
  "properties" : {
    "id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "name" : {
      "type" : "string"
    }
  },
  "xml" : {
    "name" : "Category"
  }
},"Pet": {
  "required" : [ "name", "photoUrls" ],
  "properties" : {
    "id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "category" : {
      "$ref" : "#/definitions/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" : "#/definitions/Tag"
      }
    },
    "status" : {
      "type" : "string",
      "description" : "pet status in the store",
      "enum" : [ "available", "pending", "sold" ]
    }
  },
  "xml" : {
    "name" : "Pet"
  }
},"Tag": {
  "properties" : {
    "id" : {
      "type" : "integer",
      "format" : "int64"
    },
    "name" : {
      "type" : "string"
    }
  },
  "xml" : {
    "name" : "Tag"
  }
},"Order": {
  "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"
    }
  },
  "xml" : {
    "name" : "Order"
  }
}
  }
}
