· 4 years ago · Apr 14, 2021, 11:06 PM
1swagger: "2.0"
2info:
3 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."
4 version: "1.0.0"
5 title: "Swagger Petstore"
6 termsOfService: "http://swagger.io/terms/"
7 contact:
8 email: "apiteam@swagger.io"
9 license:
10 name: "Apache 2.0"
11 url: "http://www.apache.org/licenses/LICENSE-2.0.html"
12host: "petstore.swagger.io"
13basePath: "/v2"
14tags:
15- name: "pet"
16 description: "Everything about your Pets"
17 externalDocs:
18 description: "Find out more"
19 url: "http://swagger.io"
20- name: "store"
21 description: "Access to Petstore orders"
22- name: "user"
23 description: "Operations about user"
24 externalDocs:
25 description: "Find out more about our store"
26 url: "http://swagger.io"
27schemes:
28- "https"
29- "http"
30paths:
31 /pet:
32 post:
33 tags:
34 - "pet"
35 summary: "Add a new pet to the store"
36 description: ""
37 operationId: "addPet"
38 consumes:
39 - "application/json"
40 - "application/xml"
41 produces:
42 - "application/xml"
43 - "application/json"
44 parameters:
45 - in: "body"
46 name: "body"
47 description: "Pet object that needs to be added to the store"
48 required: true
49 schema:
50 $ref: "#/definitions/Order"
51 responses:
52 "200":
53 description: "1"
54definitions:
55 Order:
56 type: "object"
57 properties:
58 id:
59 type: "integer"
60 format: "int64"
61 petId:
62 type: "integer"
63 format: "int64"
64 quantity:
65 type: "integer"
66 format: "int32"
67 shipDate:
68 type: "string"
69 format: "date-time"
70 category:
71 $ref: "#/definitions/Category"
72 status:
73 type: "string"
74 description: "Order Status"
75 enum:
76 - "placed"
77 - "approved"
78 - "delivered"
79 complete:
80 type: "boolean"
81 default: false
82 xml:
83 name: "Order"
84 Category:
85 type: "object"
86 properties:
87 id:
88 type: "integer"
89 format: "int64"
90 name:
91 type: "string"
92 xml:
93 name: "Category"