Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- swagger: "2.0"
- info:
- description: "Description of Worldnet's API "
- version: "1.0.0"
- title: "Worldnet International"
- termsOfService: "https://www.worldnet-intl.com/privacy-policy"
- contact:
- email: "dev@worldnet-intl.com"
- license:
- name: "TBD"
- url: "http://www.apache.org/licenses/LICENSE-2.0.html"
- host: "apidev.lightening.co"
- #basePath: ""
- tags:
- - name: "login"
- description: "Route for login"
- - name: "pet"
- description: "Access to Petstore orders"
- - name: "user"
- description: "Operations about user"
- externalDocs:
- description: "Find out more about our store"
- url: "http://swagger.io"
- schemes:
- - "https"
- paths:
- /login:
- post:
- tags:
- - "login"
- summary: "Login"
- description: ""
- operationId: "login"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "Credentials for logging in"
- required: true
- schema:
- $ref: "#/definitions/Login"
- responses:
- 422:
- description: "Invalid Authentication"
- 202:
- description: "Authentication Success"
- /pet/{petId}:
- get:
- tags:
- - "pet"
- summary: "Find pet by ID"
- description: "Returns a single pet"
- operationId: "getPetById"
- produces:
- - "application/xml"
- - "application/json"
- parameters:
- - name: "petId"
- in: "path"
- description: "ID of pet to return"
- required: true
- type: "integer"
- format: "int64"
- responses:
- 200:
- description: "successful operation"
- schema:
- $ref: "#/definitions/Pet"
- 400:
- description: "Invalid ID supplied"
- 404:
- description: "Pet not found"
- security:
- - api_key: []
- post:
- tags:
- - "pet"
- summary: "Updates a pet in the store with form data"
- description: ""
- operationId: "updatePetWithForm"
- consumes:
- - "application/x-www-form-urlencoded"
- produces:
- - "application/xml"
- - "application/json"
- parameters:
- - name: "petId"
- in: "path"
- description: "ID of pet that needs to be updated"
- required: true
- type: "integer"
- format: "int64"
- - 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"
- security:
- - petstore_auth:
- - "write:pets"
- - "read:pets"
- delete:
- tags:
- - "pet"
- summary: "Deletes a pet"
- description: ""
- operationId: "deletePet"
- produces:
- - "application/xml"
- - "application/json"
- parameters:
- - name: "api_key"
- in: "header"
- required: false
- type: "string"
- - name: "petId"
- in: "path"
- description: "Pet id to delete"
- required: true
- type: "integer"
- format: "int64"
- responses:
- 400:
- description: "Invalid ID supplied"
- 404:
- description: "Pet not found"
- security:
- - petstore_auth:
- - "write:pets"
- - "read:pets"
- 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"
- 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:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- name:
- type: "string"
- xml:
- name: "Tag"
- Login:
- type: "object"
- required:
- - "username"
- - "password"
- properties:
- username:
- type: "string"
- password:
- type: "string"
- Pet:
- type: "object"
- 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"
- 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