Debian Codegraph @

fixtures/json/resources/reusableParameters.json

raw
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": {
9 "name": "wordnik api team",
10 "url": "http://developer.wordnik.com"
11 },
12 "license": {
13 "name": "Creative Commons 4.0 International",
14 "url": "http://creativecommons.org/licenses/by/4.0/"
15 }
16 },
17 "host": "my.api.com",
18 "basePath": "/v1",
19 "schemes": [
20 "http",
21 "https"
22 ],
23 "consumes": [
24 "application/json"
25 ],
26 "produces": [
27 "application/json",
28 "application/xml"
29 ],
30 "paths": {
31 "/pets/{id}": {
32 "get": {
33 "description": "Returns pets based on ID",
34 "summary": "Find pets by ID",
35 "operationId": "getPetsById",
36 "parameters": [
37 { "$ref": "#/parameters/skipParam" },
38 { "$ref": "#/parameters/limitParam" }
39 ],
40 "responses": {
41 "200": {
42 "description": "pet response",
43 "schema": {
44 "type": "array",
45 "items": {
46 "$ref": "Pet"
47 }
48 }
49 },
50 "default": {
51 "description": "error payload",
52 "schema": {
53 "$ref": "ErrorModel"
54 }
55 }
56 }
57 }
58 }
59 },
60 "parameters": {
61 "skipParam": {
62 "name": "skip",
63 "in": "query",
64 "description": "number of items to skip",
65 "required": true,
66 "type": "integer",
67 "format": "int32"
68 },
69 "limitParam": {
70 "name": "limit",
71 "in": "query",
72 "description": "max records to return",
73 "required": true,
74 "type": "integer",
75 "format": "int32"
76 }
77 },
78 "definitions": {
79 "Pet": {
80 "required": [
81 "name"
82 ],
83 "properties": {
84 "name": {
85 "type": "string"
86 },
87 "tag": {
88 "type": "string"
89 }
90 }
91 },
92 "ErrorModel": {
93 "required": [ "code", "message" ],
94 "properties": {
95 "code": {
96 "type": "integer",
97 "format": "int32"
98 },
99 "message": {
100 "type": "string"
101 }
102 }
103 }
104 }
105 }