File tree Expand file tree Collapse file tree 2 files changed +115
-0
lines changed
Expand file tree Collapse file tree 2 files changed +115
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "swagger" : 2.0 ,
3+ "info" : {
4+ "version" : " 1.0.9-abcd" ,
5+ "title" : " Swagger Sample API" ,
6+ "description" : " A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification" ,
7+ "termsOfService" : " http://helloreverb.com/terms/" ,
8+ "contact" : " mailto://apiteam@wordnik.com" ,
9+ "license" : " Creative Commons 4.0 International" ,
10+ "licenseUrl" : " http://creativecommons.org/licenses/by/4.0/"
11+ },
12+ "host" : " my.api.com" ,
13+ "basePath" : " /v1" ,
14+ "resources" : {
15+ "schemes" : [
16+ " http" ,
17+ " https"
18+ ],
19+ "produces" : [
20+ " application/json" ,
21+ " application/xml"
22+ ],
23+ "/pets/{petId}" : {
24+ "get" : {
25+ "summary" : " Find pet by ID" ,
26+ "description" : " Returns a pet based on ID" ,
27+ "nickname" : " getPetsById" ,
28+ "produces" : [
29+ " application/json" ,
30+ " application/xml" ,
31+ " text/plain" ,
32+ " text/html"
33+ ],
34+ "parameters" : [
35+ {
36+ "name" : " petId" ,
37+ "kind" : " path" ,
38+ "summary" : " ID of pet that needs to be fetched" ,
39+ "required" : true ,
40+ "type" : " array" ,
41+ "items" : {
42+ "type" : " string" ,
43+ "format" : " csv"
44+ }
45+ },
46+ {
47+ "name" : " verbose" ,
48+ "kind" : " query" ,
49+ "description" : " Expand the response and show extra data" ,
50+ "required" : false ,
51+ "type" : " boolean"
52+ }
53+ ],
54+ "responses" : {
55+ "200" : {
56+ "description" : null ,
57+ "type" : " Pet"
58+ },
59+ "400" : {
60+ "description" : " Invalid ID supplied <= this is purely for documentation" ,
61+ "type" : " ErrorModel"
62+ },
63+ "404" : {
64+ "description" : " Pet not found"
65+ }
66+ }
67+ }
68+ }
69+ },
70+ "models" : {
71+ "Pet" : {
72+ "required" : [
73+ " name"
74+ ],
75+ "properties" : {
76+ "name" : {
77+ "type" : " string"
78+ },
79+ "tag" : {
80+ "$ref" : " Tag"
81+ }
82+ }
83+ },
84+ "Tag" : {
85+ "required" : [
86+ " id" ,
87+ " name"
88+ ],
89+ "properties" : {
90+ "name" : {
91+ "type" : " string"
92+ },
93+ "id" : {
94+ "type" : " integer" ,
95+ "format" : " int64"
96+ }
97+ }
98+ },
99+ "ErrorModel" : {
100+ "required" : [
101+ " code" ,
102+ " message"
103+ ],
104+ "properties" : {
105+ "code" : {
106+ "type" : " integer" ,
107+ "format" : " int32"
108+ },
109+ "message" : {
110+ "type" : " string"
111+ }
112+ }
113+ }
114+ }
115+ }
You can’t perform that action at this time.
0 commit comments