mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 19:33:55 +00:00
88 lines
2.4 KiB
YAML
88 lines
2.4 KiB
YAML
|
apiVersion: 1.0.0
|
||
|
swaggerVersion: "1.2"
|
||
|
basePath: "http://localhost:8002/api"
|
||
|
resourcePath: /store
|
||
|
produces:
|
||
|
- application/json
|
||
|
- application/xml
|
||
|
apis:
|
||
|
- path: "/store/order/{orderId}"
|
||
|
operations:
|
||
|
- method: GET
|
||
|
summary: Find purchase order by ID
|
||
|
notes: For valid response try integer IDs with value <= 5. Anything above 5 or nonintegers will generate API errors
|
||
|
type: Order
|
||
|
nickname: getOrderById
|
||
|
produces:
|
||
|
- application/json
|
||
|
- application/xml
|
||
|
parameters:
|
||
|
- name: orderId
|
||
|
description: ID of pet that needs to be fetched
|
||
|
required: true
|
||
|
allowMultiple: false
|
||
|
type: string
|
||
|
paramType: path
|
||
|
responseMessages:
|
||
|
- code: 400
|
||
|
message: Invalid ID supplied
|
||
|
- code: 404
|
||
|
message: Order not found
|
||
|
- method: DELETE
|
||
|
summary: Delete purchase order by ID
|
||
|
notes: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||
|
type: void
|
||
|
nickname: deleteOrder
|
||
|
parameters:
|
||
|
- name: orderId
|
||
|
description: ID of the order that needs to be deleted
|
||
|
required: true
|
||
|
allowMultiple: false
|
||
|
type: string
|
||
|
paramType: path
|
||
|
responseMessages:
|
||
|
- code: 400
|
||
|
message: Invalid ID supplied
|
||
|
- code: 404
|
||
|
message: Order not found
|
||
|
- path: /store/order
|
||
|
operations:
|
||
|
- method: POST
|
||
|
summary: Place an order for a pet
|
||
|
notes: ""
|
||
|
type: void
|
||
|
nickname: placeOrder
|
||
|
parameters:
|
||
|
- name: body
|
||
|
description: order placed for purchasing the pet
|
||
|
required: true
|
||
|
allowMultiple: false
|
||
|
type: Order
|
||
|
paramType: body
|
||
|
responseMessages:
|
||
|
- code: 400
|
||
|
message: Invalid order
|
||
|
models:
|
||
|
Order:
|
||
|
id: Order
|
||
|
properties:
|
||
|
id:
|
||
|
type: integer
|
||
|
format: int64
|
||
|
status:
|
||
|
type: string
|
||
|
description: Order Status
|
||
|
enum:
|
||
|
- placed
|
||
|
- approved
|
||
|
- delivered
|
||
|
petId:
|
||
|
type: integer
|
||
|
format: int64
|
||
|
quantity:
|
||
|
type: integer
|
||
|
format: int32
|
||
|
shipDate:
|
||
|
type: string
|
||
|
format: date-time
|