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: medication
- description: Operations about medication
- - name: user
- description: Operations about user
- externalDocs:
- description: Find out more about our store
- url: 'http://swagger.io'
- schemes:
- - http
- paths:
- /medication:
- post:
- security:
- - bearerAuth: []
- tags:
- - medication
- summary: Create medication
- description: Create medication
- operationId: createMedication
- produces:
- - application/json
- parameters:
- - in: body
- name: body
- description: Medication object
- required: true
- schema:
- $ref: '#/definitions/CreateMedicationModel'
- responses:
- default:
- description: successful operation
- /medications:
- get:
- security:
- - bearerAuth: []
- tags:
- - medication
- summary: Get user's medications
- description: Get user's meeications
- operationId: getMedications
- produces:
- - application/json
- responses:
- '200':
- description: successful operation
- schema:
- type: array
- items:
- $ref: '#/definitions/MedicationModel'
- '400':
- description: Invalid status value
- /user:
- post:
- tags:
- - user
- summary: Create user
- description: Register
- operationId: createUser
- produces:
- - application/xml
- - application/json
- parameters:
- - in: body
- name: body
- description: User object
- required: true
- schema:
- $ref: '#/definitions/CreateUserModel'
- responses:
- default:
- description: successful operation
- put:
- security:
- - bearerAuth: []
- tags:
- - user
- summary: Updated user
- description: This can only be done by the logged in user.
- operationId: updateUser
- produces:
- - application/xml
- - application/json
- parameters:
- - in: body
- name: body
- description: Updated user object
- required: true
- schema:
- $ref: '#/definitions/CreateUserModel'
- responses:
- '400':
- description: Invalid user supplied
- '404':
- description: User not found
- get:
- security:
- - bearerAuth: []
- tags:
- - user
- summary: Gets current user
- description: ""
- produces:
- - application/xml
- - application/json
- responses:
- default:
- description: successful operation
- schema:
- $ref: '#/definitions/User'
- /user/sessions:
- post:
- tags:
- - user
- summary: Logs user into the system
- description: Login
- operationId: loginUser
- produces:
- - application/xml
- - application/json
- parameters:
- - in: body
- name: body
- description: User object
- required: true
- schema:
- $ref: '#/definitions/LoginUserModel'
- responses:
- '200':
- description: successful operation
- schema:
- $ref: '#/definitions/SessionTokenModel'
- '400':
- description: Invalid username/password supplied
- components:
- securitySchemes:
- bearerAuth:
- type: http
- scheme: bearer
- bearerFormat: JWT
- 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
- CreateMedicationModel:
- type: object
- properties:
- name:
- type: string
- reminder:
- type: string
- description: Reminder Status
- enum:
- - morning
- - noon
- - evening
- - night
- quantity:
- type: number
- MedicationModel:
- type: object
- properties:
- id:
- type: integer
- name:
- type: string
- reminder:
- type: string
- description: Reminder Status
- enum:
- - morning
- - noon
- - evening
- - night
- quantity:
- type: number
- AddressModel:
- type: object
- properties:
- latitude:
- type: number
- longitude:
- type: number
- name:
- type: string
- ContactModel:
- type: object
- properties:
- address:
- $ref: '#/definitions/AddressModel'
- phone:
- type: string
- email:
- type: string
- SessionTokenModel:
- type: object
- properties:
- sessionToken:
- type: string
- LoginUserModel:
- type: object
- properties:
- username:
- type: string
- password:
- type: string
- CreateUserModel:
- type: object
- properties:
- phapharmacyId:
- type: integer
- format: int64
- name:
- type: string
- password:
- type: string
- dateOfBirth:
- type: string
- phone:
- type: string
- email:
- type: string
- address:
- $ref: '#/definitions/AddressModel'
- insuranceCardNumber:
- type: integer
- format: int64
- xml:
- name: User
- Pharmacy:
- type: object
- properties:
- id:
- type: integer
- format: int64
- name:
- type: string
- addresses:
- items:
- $ref: '#/definitions/AddressModel'
- contacts:
- items:
- $ref: '#/definitions/ContactModel'
- User:
- type: object
- properties:
- id:
- type: integer
- format: int64
- phapharmacy:
- $ref: '#/definitions/Pharmacy'
- name:
- type: string
- dateOfBirth:
- type: string
- address:
- $ref: '#/definitions/AddressModel'
- phone:
- type: string
- email:
- type: string
- insuranceCardNumber:
- type: integer
- format: int64
- xml:
- name: User
- UserLoginMode:
- type: object
- properties:
- username:
- type: string
- password:
- type: string
- Tag:
- type: object
- properties:
- id:
- type: integer
- format: int64
- name:
- type: string
- xml:
- name: Tag
- 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