Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- swagger: "2.0"
- info:
- description: |
- This is a sample server.
- [Learn about Swagger](http://swagger.io) or join the IRC channel `#swagger` on irc.freenode.net.
- For this sample, you can use the api key `special-key` to test the authorization filters
- version: "1.0.0"
- title: Pasagi App
- termsOfService: http://paduraksa-teknologi.com/terms/
- contact:
- name: ry.ridwan.yusuf@gmail.com
- host: paduraksa-teknologi.com
- basePath: /pasagi
- schemes:
- - http
- - https
- paths:
- /login:
- post:
- tags:
- - auth
- summary: Logs user into the system
- description: ""
- operationId: loginUser
- produces:
- - application/json
- parameters:
- - in: header
- name: username
- description: The user name for login
- required: false
- type: string
- - in: header
- name: password
- description: The password for login encrypted ()
- required: false
- type: string
- responses:
- "200":
- description: successful operation
- schema:
- type: string
- "400":
- description: Invalid username/password supplied
- security:
- - x-pasagi-app-id: []
- - x-pasagi-app-key: []
- - x-pasagi-dev-id: []
- - x-pasagi-usr-key: []
- - x-pasagi-cc: []
- - x-pasagi-dt: []
- - x-pasagi-st: []
- - x-pasagi-lat: []
- - x-pasagi-lon: []
- /logout:
- get:
- tags:
- - auth
- summary: Logs out current logged in user session
- description: ""
- operationId: logoutUser
- produces:
- - application/json
- responses:
- default:
- description: successful operation
- security:
- - x-pasagi-app-id: []
- - x-pasagi-app-key: []
- - x-pasagi-dev-id: []
- - x-pasagi-usr-key: []
- - x-pasagi-dev-token: []
- - x-pasagi-cc: []
- - x-pasagi-dt: []
- - x-pasagi-st: []
- - x-pasagi-lat: []
- - x-pasagi-lon: []
- /users:
- post:
- tags:
- - user
- summary: Create user
- description: This can only be done by the logged in user.
- operationId: createUser
- produces:
- - application/json
- - application/xml
- parameters:
- - in: body
- name: body
- description: Created user object
- required: false
- schema:
- $ref: "#/definitions/User"
- responses:
- default:
- description: successful operation
- /users/createWithArray:
- post:
- tags:
- - user
- summary: Creates list of users with given input array
- description: ""
- operationId: createUsersWithArrayInput
- produces:
- - application/json
- - application/xml
- parameters:
- - in: body
- name: body
- description: List of user object
- required: false
- schema:
- type: array
- items:
- $ref: "#/definitions/User"
- responses:
- default:
- description: successful operation
- /users/createWithList:
- post:
- tags:
- - user
- summary: Creates list of users with given input array
- description: ""
- operationId: createUsersWithListInput
- produces:
- - application/json
- - application/xml
- parameters:
- - in: body
- name: body
- description: List of user object
- required: false
- schema:
- type: array
- items:
- $ref: "#/definitions/User"
- responses:
- default:
- description: successful operation
- /users/{username}:
- get:
- tags:
- - user
- summary: Get user by user name
- description: ""
- operationId: getUserByName
- produces:
- - application/json
- - application/xml
- parameters:
- - in: path
- name: username
- 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"
- "400":
- description: Invalid username supplied
- put:
- tags:
- - user
- summary: Updated user
- description: This can only be done by the logged in user.
- operationId: updateUser
- produces:
- - application/json
- - application/xml
- parameters:
- - in: path
- name: username
- 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:
- tags:
- - user
- summary: Delete user
- description: This can only be done by the logged in user.
- operationId: deleteUser
- produces:
- - application/json
- - application/xml
- parameters:
- - in: path
- name: username
- description: The name that needs to be deleted
- required: true
- type: string
- responses:
- "404":
- description: User not found
- "400":
- description: Invalid username supplied
- /stores/order:
- post:
- tags:
- - store
- summary: Place an order for a pet
- description: ""
- operationId: placeOrder
- produces:
- - application/json
- - application/xml
- 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
- /stores/order/{orderId}:
- get:
- tags:
- - store
- summary: Find purchase order by ID
- description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
- operationId: getOrderById
- produces:
- - application/json
- - application/xml
- parameters:
- - in: path
- name: orderId
- 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:
- tags:
- - store
- summary: Delete purchase order by ID
- description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
- operationId: deleteOrder
- produces:
- - application/json
- - application/xml
- parameters:
- - in: path
- name: orderId
- 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
- securityDefinitions:
- x-pasagi-app-id:
- type: apiKey
- name: x-pasagi-app-id
- in: header
- description: Registered application id
- x-pasagi-app-key:
- type: apiKey
- name: x-pasagi-app-key
- in: header
- description: Registered application key
- x-pasagi-dev-id:
- type: apiKey
- name: x-pasagi-dev-id
- in: header
- description: Device ID (MAC Address/ phone number/ ymid/ etc)
- x-pasagi-usr-key:
- type: apiKey
- name: x-pasagi-usr-key
- in: header
- description: User Key
- x-pasagi-dev-token:
- type: apiKey
- name: x-pasagi-dev-token
- in: header
- description: Short lived token from login, that's needed for other request
- x-pasagi-dt:
- type: apiKey
- name: x-pasagi-dt
- in: header
- description: timestamp
- x-pasagi-st:
- type: apiKey
- name: x-pasagi-st
- in: header
- description: System Trace Audit Number
- x-pasagi-cc:
- type: apiKey
- name: x-pasagi-cc
- in: header
- description: channel code (WEB/ MOBILE/ SMS/ H2H/ GTALK/ YM)
- x-pasagi-lat:
- type: apiKey
- name: x-pasagi-lat
- in: header
- description: Location Latitude
- x-pasagi-lon:
- type: apiKey
- name: x-pasagi-lon
- in: header
- description: Location Longitude
- definitions:
- 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
- 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
- complete:
- type: boolean
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement