Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- swagger: "2.0"
- info:
- description: "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters."
- version: "1.0.0"
- title: "Swagger Petstore"
- termsOfService: "http://swagger.io/terms/"
- contact:
- email: "apiteam@swagger.io"
- license:
- name: "Apache 2.0"
- url: "http://www.apache.org/licenses/LICENSE-2.0.html"
- host: "petstore.swagger.io"
- basePath: "/v2"
- tags:
- - name: "transactions"
- - name: "transactionId"
- - name: "user"
- - name: "statistics"
- - name: "enter"
- - name: "groups"
- - name: "groupId"
- schemes:
- - "http"
- paths:
- /transactions:
- post:
- tags:
- - "transactions"
- summary: "Add a new transaction"
- description: ""
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "Transaction-input object"
- required: true
- schema:
- $ref: "#/definitions/Pet"
- responses:
- 400:
- description: "Invalid input"
- security:
- - petstore_auth:
- - "write:pets"
- - "read:pets"
- get:
- tags:
- - "transactions"
- summary: "Get all transactions"
- description: ""
- operationId: "updatePet"
- produces:
- - "application/json"
- responses:
- 404:
- description: "Transactions not found"
- security:
- - petstore_auth:
- - "write:pets"
- - "read:pets"
- /groups:
- post:
- tags:
- - "groups"
- summary: "Create group"
- description: ""
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "Pet object that needs to be added to the store"
- required: true
- schema:
- $ref: "#/definitions/Tag"
- responses:
- 400:
- description: "Invalid input"
- security:
- - petstore_auth:
- - "write:pets"
- - "read:pets"
- get:
- tags:
- - "groups"
- summary: "Get all groups where you are member"
- description: ""
- consumes:
- - "application/json"
- produces:
- - "application/json"
- responses:
- 404:
- description: "Pet not found"
- security:
- - petstore_auth:
- - "write:pets"
- - "read:pets"
- /transactionId:
- get:
- tags:
- - "transactionId"
- summary: "Get all about transaction"
- produces:
- - "application/json"
- parameters:
- - name: "id"
- in: "query"
- description: "Status values that need to be considered for filter"
- required: true
- type: "integer"
- responses:
- 200:
- description: "successful operation"
- schema:
- $ref: "#/definitions/Pet"
- 404:
- description: "Not found"
- delete:
- tags:
- - "transactionId"
- summary: "Delete transaction"
- parameters:
- - name: "id"
- in: "query"
- description: "Status values that need to be considered for filter"
- required: true
- type: "integer"
- responses:
- 200:
- description: "successful operation"
- 404:
- description: "Not found"
- /groupId:
- get:
- tags:
- - "groupId"
- summary: "Get group"
- description: "Multiple status values can be provided with comma separated strings"
- produces:
- - "application/json"
- parameters:
- - name: "id"
- in: "query"
- description: "Status values that need to be considered for filter"
- required: true
- type: "integer"
- responses:
- 200:
- description: "successful operation"
- schema:
- $ref: "#/definitions/Tag"
- 400:
- description: "Invalid id"
- delete:
- tags:
- - "groupId"
- summary: "Delete group"
- parameters:
- - name: "id"
- in: "query"
- description: "Status values that need to be considered for filter"
- required: true
- type: "integer"
- responses:
- 200:
- description: "successful operation"
- 404:
- description: "Not found"
- /user:
- get:
- tags:
- - "user"
- summary: "Get user info"
- description: "This can only be done by the logged in user."
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "id"
- description: "Return user object"
- required: true
- responses:
- 200:
- description: "successful operation"
- schema:
- $ref: "#/definitions/User"
- /enter:
- post:
- tags:
- - "enter"
- summary: "Post google token to auth"
- description: "This can only be done by the logged in user."
- produces:
- - "application/xml"
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "Created user object"
- required: true
- schema:
- $ref: "#/definitions/User"
- responses:
- default:
- description: "successful operation"
- /statistics:
- get:
- tags:
- - "statistics"
- summary: "Get statistics"
- description: "This can only be done by the logged in user."
- produces:
- - "application/xml"
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "Created user object"
- required: true
- schema:
- $ref: "#/definitions/User"
- responses:
- default:
- description: "successful operation"
- securityDefinitions:
- petstore_auth:
- type: "oauth2"
- authorizationUrl: "http://petstore.swagger.io/oauth/dialog"
- flow: "implicit"
- scopes:
- write:pets: "modify pets in your account"
- read:pets: "read your pets"
- api_key:
- type: "apiKey"
- name: "api_key"
- in: "header"
- definitions:
- Order:
- 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:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- name:
- type: "string"
- xml:
- name: "Category"
- User:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- nick:
- type: "string"
- xml:
- name: "User"
- Tag:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- name:
- type: "string"
- creatorId:
- type: "integer"
- format: "int64"
- xml:
- name: "Tag"
- Pet:
- type: "object"
- properties:
- group:
- type: "integer"
- format: "int64"
- source:
- type: "integer"
- format: "int64"
- sum:
- type: "integer"
- format: "int64"
- matter:
- type: "string"
- example: "doggie"
- targets:
- type: "string"
- example: "1 2 3 4"
- comment:
- type: "string"
- example: "doggie"
- xml:
- name: "Pet"
- ApiResponse:
- type: "object"
- properties:
- code:
- type: "integer"
- format: "int32"
- type:
- type: "string"
- message:
- type: "string"
- externalDocs:
- description: "Find out more about Swagger"
- url: "http://swagger.io"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement