1+ {
2+ "openapi" : " 3.1.0" ,
3+ "info" : {
4+ "title" : " example-api" ,
5+ "description" : " Example of RestApiWithSpec" ,
6+ "version" : " 0.0.1"
7+ },
8+ "paths" : {
9+ "/" : {
10+ "get" : {
11+ "summary" : " Get root" ,
12+ "description" : " Returns the root object" ,
13+ "responses" : {
14+ "200" : {
15+ "description" : " 200 response"
16+ }
17+ }
18+ }
19+ },
20+ "/pet" : {
21+ "post" : {
22+ "summary" : " Add pet" ,
23+ "description" : " Adds a new pet to the store" ,
24+ "requestBody" : {
25+ "content" : {
26+ "application/json" : {
27+ "schema" : {
28+ "$ref" : " #/components/schemas/exampleapiPetModel43E308F7"
29+ }
30+ }
31+ }
32+ },
33+ "responses" : {
34+ "200" : {
35+ "description" : " Successful operation"
36+ },
37+ "405" : {
38+ "description" : " Invalid input"
39+ }
40+ },
41+ "security" : [
42+ {
43+ "ExampleAuthorizer6BF672C7" : []
44+ }
45+ ]
46+ }
47+ },
48+ "/pet/findByStatus" : {
49+ "get" : {
50+ "summary" : " Finds Pets by status" ,
51+ "description" : " Multiple status values can be provided with comma separated strings" ,
52+ "parameters" : [
53+ {
54+ "description" : " Status values that need to be considered for filter" ,
55+ "required" : false ,
56+ "explode" : true ,
57+ "schema" : {
58+ "type" : " string" ,
59+ "enum" : [
60+ " available" ,
61+ " pending" ,
62+ " sold"
63+ ],
64+ "default" : " available"
65+ },
66+ "name" : " status" ,
67+ "in" : " query"
68+ }
69+ ],
70+ "responses" : {
71+ "200" : {
72+ "description" : " successful operation" ,
73+ "content" : {
74+ "application/json" : {
75+ "schema" : {
76+ "$ref" : " #/components/schemas/exampleapiPetArrayModel74DA5883"
77+ }
78+ }
79+ }
80+ }
81+ }
82+ }
83+ },
84+ "/pet/{petId}" : {
85+ "parameters" : [
86+ {
87+ "description" : " ID of pet" ,
88+ "required" : true ,
89+ "schema" : {
90+ "type" : " integer" ,
91+ "format" : " int64" ,
92+ "example" : 123
93+ },
94+ "name" : " petId" ,
95+ "in" : " path"
96+ }
97+ ],
98+ "get" : {
99+ "summary" : " Find pet by ID" ,
100+ "description" : " Returns a single pet" ,
101+ "responses" : {
102+ "200" : {
103+ "description" : " successful operation" ,
104+ "content" : {
105+ "application/json" : {
106+ "schema" : {
107+ "$ref" : " #/components/schemas/exampleapiPetModel43E308F7"
108+ }
109+ }
110+ }
111+ },
112+ "400" : {
113+ "description" : " Invalid ID supplied"
114+ },
115+ "404" : {
116+ "description" : " Pet not found"
117+ }
118+ }
119+ },
120+ "post" : {
121+ "summary" : " Updates a pet in the store with form data" ,
122+ "description" : " " ,
123+ "parameters" : [
124+ {
125+ "description" : " ID of pet that needs to be updated" ,
126+ "required" : true ,
127+ "schema" : {
128+ "type" : " integer" ,
129+ "format" : " int64" ,
130+ "example" : 123
131+ },
132+ "name" : " petId" ,
133+ "in" : " path"
134+ },
135+ {
136+ "description" : " Name of pet that needs to be updated" ,
137+ "schema" : {
138+ "type" : " string"
139+ },
140+ "name" : " name" ,
141+ "in" : " query"
142+ },
143+ {
144+ "description" : " Status of pet that needs to be updated" ,
145+ "schema" : {
146+ "type" : " string"
147+ },
148+ "name" : " status" ,
149+ "in" : " query"
150+ }
151+ ],
152+ "responses" : {
153+ "200" : {
154+ "description" : " successful operation"
155+ },
156+ "405" : {
157+ "description" : " Invalid input"
158+ }
159+ },
160+ "security" : [
161+ {
162+ "ExampleAuthorizer6BF672C7" : []
163+ }
164+ ]
165+ }
166+ }
167+ },
168+ "components" : {
169+ "schemas" : {
170+ "exampleapiPetModel43E308F7" : {
171+ "description" : " A pet" ,
172+ "properties" : {
173+ "id" : {
174+ "description" : " ID of the pet" ,
175+ "example" : 123 ,
176+ "format" : " int64" ,
177+ "type" : " integer"
178+ },
179+ "name" : {
180+ "description" : " Name of the pet" ,
181+ "example" : " Monaka" ,
182+ "type" : " string"
183+ },
184+ "status" : {
185+ "description" : " Status of the pet" ,
186+ "enum" : [
187+ " available" ,
188+ " pending" ,
189+ " sold"
190+ ],
191+ "example" : " sold" ,
192+ "type" : " string"
193+ }
194+ },
195+ "title" : " pet" ,
196+ "type" : " object"
197+ },
198+ "exampleapiPetArrayModel74DA5883" : {
199+ "description" : " An array of pets" ,
200+ "example" : [
201+ {
202+ "id" : 123 ,
203+ "name" : " Monaka" ,
204+ "status" : " sold"
205+ }
206+ ],
207+ "items" : {
208+ "$ref" : " #/components/schemas/exampleapiPetModel43E308F7"
209+ },
210+ "title" : " petArray" ,
211+ "type" : " array"
212+ }
213+ },
214+ "securitySchemes" : {
215+ "ExampleAuthorizer6BF672C7" : {
216+ "type" : " apiKey" ,
217+ "in" : " header" ,
218+ "name" : " Authorization"
219+ }
220+ }
221+ }
222+ }
0 commit comments