Debian Codegraph @

fixtures/json/resources/stringPathParamResource.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/{petId}": {
32 "get": {
33 "description": "Returns a pet based on ID",
34 "summary": "Find pet by ID",
35 "operationId": "getPetsById",
36 "produces": [
37 "application/json",
38 "text/html"
39 ],
40 "parameters": [
41 {
42 "name": "petId",
43 "in": "path",
44 "description": "ID of pet that needs to be fetched",
45 "required": true,
46 "type": "array",
47 "items": {
48 "type": "string"
49 },
50 "collectionFormat": "csv"
51 }
52 ],
53 "responses": {
54 "200": {
55 "description": "pet response",
56 "schema": {
57 "$ref": "Pet"
58 }
59 },
60 "default": {
61 "description": "error payload",
62 "schema": {
63 "$ref": "ErrorModel"
64 }
65 }
66 }
67 }
68 }
69 },
70 "definitions": {
71 "Pet": {
72 "required": [
73 "name"
74 ],
75 "properties": {
76 "name": {
77 "type": "string"
78 },
79 "tag": {
80 "type": "string"
81 }
82 }
83 },
84 "ErrorModel": {
85 "required": [ "code", "message" ],
86 "properties": {
87 "code": {
88 "type": "integer",
89 "format": "int32"
90 },
91 "message": {
92 "type": "string"
93 }
94 }
95 }
96 }
97 }