Debian Codegraph @

fixtures/json/resources/resourceWithRelativeHost.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 "basePath": "/v1",
18 "schemes": [
19 "http",
20 "https"
21 ],
22 "consumes": [
23 "application/json"
24 ],
25 "produces": [
26 "application/json",
27 "application/xml"
28 ],
29 "paths": {
30 "/pets/{id}": {
31 "parameters": [
32 {
33 "name": "id",
34 "in": "path",
35 "description": "ID of pet to use",
36 "required": true,
37 "type": "array",
38 "items": {
39 "type": "string"
40 },
41 "collectionFormat": "csv"
42 }
43 ],
44 "get": {
45 "description": "Returns pets based on ID",
46 "summary": "Find pets by ID",
47 "operationId": "getPetsById",
48 "produces": [
49 "application/json",
50 "text/html"
51 ],
52 "responses": {
53 "200": {
54 "description": "pet response",
55 "schema": {
56 "type": "array",
57 "items": {
58 "$ref": "Pet"
59 }
60 }
61 },
62 "default": {
63 "description": "error payload",
64 "schema": {
65 "$ref": "ErrorModel"
66 }
67 }
68 }
69 }
70 }
71 },
72 "definitions": {
73 "Pet": {
74 "required": [
75 "name"
76 ],
77 "properties": {
78 "name": {
79 "type": "string"
80 },
81 "tag": {
82 "type": "string"
83 }
84 }
85 },
86 "ErrorModel": {
87 "required": [ "code", "message" ],
88 "properties": {
89 "code": {
90 "type": "integer",
91 "format": "int32"
92 },
93 "message": {
94 "type": "string"
95 }
96 }
97 }
98 }
99 }