git.iko.soy/typeable/servant
on orphan-instances help sign in
158 lines 4.9 kB history raw
1{
2 "swagger": "2.0",
3 "info": {
4 "version": "1.0",
5 "title": "Todo API",
6 "license": {
7 "url": "http://mit.com",
8 "name": "MIT"
9 },
10 "description": "This is an API that tests swagger integration"
11 },
12 "definitions": {
13 "Todo": {
14 "example": {
15 "summary": "get milk",
16 "created": "2015-12-31T00:00:00Z"
17 },
18 "required": [
19 "created",
20 "summary"
21 ],
22 "type": "object",
23 "description": "This is some real Todo right here",
24 "properties": {
25 "summary": {
26 "type": "string"
27 },
28 "created": {
29 "$ref": "#/definitions/UTCTime"
30 }
31 }
32 },
33 "UTCTime": {
34 "example": "2016-07-22T00:00:00Z",
35 "format": "yyyy-mm-ddThh:MM:ssZ",
36 "type": "string"
37 },
38 "TodoId": {
39 "maximum": 9223372036854775807,
40 "minimum": -9223372036854775808,
41 "type": "integer"
42 }
43 },
44 "paths": {
45 "/todo/{id}": {
46 "get": {
47 "responses": {
48 "400": {
49 "description": "Invalid `id`"
50 },
51 "200": {
52 "schema": {
53 "$ref": "#/definitions/Todo"
54 },
55 "description": ""
56 }
57 },
58 "produces": [
59 "application/json;charset=utf-8"
60 ],
61 "parameters": [
62 {
63 "maximum": 9223372036854775807,
64 "minimum": -9223372036854775808,
65 "required": true,
66 "in": "path",
67 "name": "id",
68 "type": "integer"
69 }
70 ]
71 },
72 "put": {
73 "consumes": [
74 "application/json;charset=utf-8"
75 ],
76 "responses": {
77 "400": {
78 "description": "Invalid `body` or `id`"
79 },
80 "200": {
81 "schema": {
82 "$ref": "#/definitions/TodoId"
83 },
84 "description": ""
85 }
86 },
87 "produces": [
88 "application/json;charset=utf-8"
89 ],
90 "parameters": [
91 {
92 "maximum": 9223372036854775807,
93 "minimum": -9223372036854775808,
94 "required": true,
95 "in": "path",
96 "name": "id",
97 "type": "integer"
98 },
99 {
100 "required": true,
101 "schema": {
102 "$ref": "#/definitions/Todo"
103 },
104 "in": "body",
105 "name": "body"
106 }
107 ]
108 }
109 },
110 "/todo": {
111 "post": {
112 "consumes": [
113 "application/json;charset=utf-8"
114 ],
115 "responses": {
116 "400": {
117 "description": "Invalid `body`"
118 },
119 "200": {
120 "schema": {
121 "$ref": "#/definitions/TodoId"
122 },
123 "description": ""
124 }
125 },
126 "produces": [
127 "application/json;charset=utf-8"
128 ],
129 "parameters": [
130 {
131 "required": true,
132 "schema": {
133 "$ref": "#/definitions/Todo"
134 },
135 "in": "body",
136 "name": "body"
137 }
138 ]
139 },
140 "get": {
141 "responses": {
142 "200": {
143 "schema": {
144 "items": {
145 "$ref": "#/definitions/Todo"
146 },
147 "type": "array"
148 },
149 "description": ""
150 }
151 },
152 "produces": [
153 "application/json;charset=utf-8"
154 ]
155 }
156 }
157 }