github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/fixtures/diff/path.v2.json (about) 1 { 2 "swagger": "2.0", 3 "info": { 4 "title": "Swagger Fixture", 5 "version": "1.0" 6 }, 7 "paths": { 8 "/a/": { 9 "get": { 10 "parameters": [ 11 { 12 "name": "limit", 13 "in": "query", 14 "required": false, 15 "type": "integer" 16 } 17 ], 18 "responses": { 19 "200": { 20 "description": "200 response", 21 "schema": { 22 "type": "array", 23 "items": { "$ref": "#/definitions/A1" } 24 } 25 } 26 } 27 }, 28 "put": { 29 "parameters": [ 30 { 31 "name": "", 32 "in": "body", 33 "schema": { "$ref": "#/definitions/A2" } 34 } 35 ], 36 "responses": { 37 "200": { 38 "description": "200 response", 39 "schema": { "$ref": "#/definitions/A3" } 40 } 41 } 42 } 43 }, 44 "/a/{id}": { 45 "get": { 46 "parameters": [ 47 { 48 "name": "id", 49 "in": "path", 50 "required": true, 51 "type": "integer" 52 } 53 ], 54 "responses": { 55 "200": { 56 "description": "200 response", 57 "schema": { "$ref": "#/definitions/A3" } 58 } 59 } 60 }, 61 "patch" : { 62 "parameters": [ 63 { 64 "name": "id", 65 "in": "path", 66 "required": true, 67 "type": "integer" 68 }, 69 { 70 "name": "", 71 "in": "body", 72 "schema": { "$ref": "#/definitions/A4" } 73 } 74 ], 75 "responses": { 76 "200": { 77 "description": "200 response", 78 "schema": { "$ref": "#/definitions/A6" } 79 } 80 } 81 }, 82 "put" : { 83 "parameters": [ 84 { 85 "name": "id", 86 "in": "path", 87 "required": true, 88 "type": "integer" 89 }, 90 { 91 "name": "", 92 "in": "body", 93 "schema": { "$ref": "#/definitions/A2" } 94 } 95 ], 96 "responses": { 97 "200": { 98 "description": "200 response", 99 "schema": { "$ref": "#/definitions/A3" } 100 } 101 } 102 } 103 }, 104 "/newpath/": { 105 "post": { 106 "parameters": [ 107 { 108 "name": "", 109 "in": "body", 110 "schema": { "$ref": "#/definitions/B3" } 111 } 112 ], 113 "responses": { 114 "200": { 115 "description": "200 response", 116 "schema": { "$ref": "#/definitions/A1" } 117 } 118 } 119 } 120 }, 121 "/b/{id}": { 122 "put": { 123 "parameters": [ 124 { 125 "name": "id", 126 "in": "path", 127 "required": true, 128 "type": "integer" 129 }, 130 { 131 "name": "", 132 "in": "body", 133 "schema": { "$ref": "#/definitions/B1" } 134 } 135 ], 136 "responses": { 137 "200": { 138 "description": "200 response", 139 "schema": { "$ref": "#/definitions/B2" } 140 } 141 } 142 } 143 }, 144 "/c/": { 145 "get": { 146 "responses": { 147 "200": { 148 "description": "200 response", 149 "schema": { 150 "type": "array", 151 "items": { "$ref": "#/definitions/C1" } 152 } 153 }, 154 "201": { 155 "description": "201 response", 156 "schema": { 157 "type": "array", 158 "items": { "$ref": "#/definitions/C1" } 159 } 160 } 161 } 162 }, 163 "post": { 164 "parameters": [ 165 { 166 "name": "", 167 "in": "body", 168 "schema": { "$ref": "#/definitions/C2" } 169 } 170 ], 171 "responses": { 172 "204": { 173 "description": "204 response" 174 } 175 } 176 } 177 } 178 }, 179 "definitions": { 180 "A1": { 181 "type": "object", 182 "properties": { 183 "id": { "type": "integer" }, 184 "name": { "type": "string" } 185 } 186 }, 187 "A2": { 188 "type": "object", 189 "required": [ "name", "description" ], 190 "properties": { 191 "name": { "type": "string" }, 192 "description": { "type": "string" } 193 } 194 }, 195 "A3": { 196 "type": "object", 197 "properties": { 198 "id": { "type": "integer" }, 199 "name": { "type": "string" }, 200 "description": { "type": "string" }, 201 "letters": { 202 "type": "array", 203 "items": { "type": "string" } 204 }, 205 "attributes": { 206 "type": "object", 207 "additionalProperties": { "type": "string" } 208 } 209 } 210 }, 211 "A4": { 212 "type": "object", 213 "properties": { 214 "id": { "type": "integer" }, 215 "name": { "type": ["string", "null"] }, 216 "obj": { "$ref": "#/definitions/A5" }, 217 "str": { "type": "string" } 218 } 219 }, 220 "A5": { 221 "type": "object", 222 "properties": { 223 "thing": { "type": "integer" }, 224 "name": { "type": "string" } 225 } 226 }, 227 "A6": { 228 "type": "object", 229 "properties": { 230 "id": { "type": "integer" }, 231 "name": { "type": "string" }, 232 "obj": { "$ref": "#/definitions/A5" }, 233 "objs": { "type": "array", 234 "items": { "$ref": "#/definitions/A5" } 235 }, 236 "str": { "type": "string" } 237 } 238 }, 239 "B1": { 240 "type": "object", 241 "allOf": [ 242 { "$ref": "#/definitions/A2" }, 243 { 244 "required": ["req"], 245 "properties": { 246 "req": { "type": "string" }, 247 "opt": { "type": "string" } 248 } 249 } 250 ] 251 }, 252 "B2": { 253 "type": "object", 254 "allOf": [ 255 { "$ref": "#/definitions/A3" }, 256 { 257 "properties": { 258 "key1": { "type": "integer" }, 259 "key2": { "type": "string" } 260 } 261 } 262 ] 263 }, 264 "B3": { 265 "type": "object", 266 "properties": { 267 "name": { "type": "string" } 268 } 269 }, 270 "C1": { 271 "type": "object", 272 "properties": { 273 "id": { "type": "integer" }, 274 "name": { "type": "string" } 275 } 276 }, 277 "C2": { 278 "type": "object", 279 "properties": { 280 "existing": { "$ref": "#/definitions/C3" } 281 } 282 }, 283 "C3": { 284 "type": "object", 285 "required": [ "a" ], 286 "properties": { 287 "a": { "type": "string" }, 288 "b": { "type": "string" } 289 } 290 }, 291 "C4": { 292 "type": "object", 293 "required": [ "a", "b" ], 294 "properties": { 295 "a": { "type": "string" }, 296 "b": { "type": "string" } 297 } 298 } 299 } 300 }