github.com/josephspurrier/go-swagger@v0.2.1-0.20221129144919-1f672a142a00/fixtures/diff/response.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 "201": { 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 }, 83 "/newpath/": { 84 "post": { 85 "parameters": [ 86 { 87 "name": "", 88 "in": "body", 89 "schema": { "$ref": "#/definitions/B3" } 90 } 91 ], 92 "responses": { 93 "200": { 94 "description": "200 response", 95 "schema": { "$ref": "#/definitions/A1" } 96 } 97 } 98 } 99 }, 100 "/c/": { 101 "get": { 102 "responses": { 103 "200": { 104 "description": "200 response", 105 "schema": { 106 "type": "array", 107 "items": { "$ref": "#/definitions/C1" } 108 } 109 }, 110 "201": { 111 "description": "201 response", 112 "schema": { 113 "type": "array", 114 "items": { "$ref": "#/definitions/C1" } 115 } 116 } 117 } 118 }, 119 "post": { 120 "parameters": [ 121 { 122 "name": "", 123 "in": "body", 124 "schema": { "$ref": "#/definitions/C2" } 125 } 126 ], 127 "responses": { 128 "204": { 129 "description": "204 response" 130 } 131 } 132 } 133 } 134 }, 135 "definitions": { 136 "A1": { 137 "type": "object", 138 "properties": { 139 "id": { "type": "integer" }, 140 "name": { "type": "string" } 141 } 142 }, 143 "A2": { 144 "type": "object", 145 "required": [ "name", "description" ], 146 "properties": { 147 "name": { "type": "string" }, 148 "description": { "type": "string" } 149 } 150 }, 151 "A3": { 152 "type": "object", 153 "properties": { 154 "id": { "type": "integer" }, 155 "name": { "type": "string" }, 156 "description": { "type": "integer", "format": "int32" }, 157 "colour":{"type": "string"}, 158 "letters": { 159 "type": "array", 160 "items": { "type": "string" } 161 }, 162 "attributes": { 163 "type": "object", 164 "additionalProperties": { "type": "string" } 165 } 166 } 167 }, 168 "A4": { 169 "type": "object", 170 "properties": { 171 "id": { "type": "integer" }, 172 "name": { "type": ["string", "null"] }, 173 "obj": { "$ref": "#/definitions/A5" }, 174 "str": { "type": "string" } 175 } 176 }, 177 "A5": { 178 "type": "object", 179 "properties": { 180 "thing": { "type": "integer" }, 181 "name": { "type": "string" } 182 } 183 }, 184 "A6": { 185 "type": "object", 186 "properties": { 187 "id": { "type": "integer" }, 188 "name": { "type": "string" }, 189 "obj": { "$ref": "#/definitions/A5" }, 190 "objs": { "type": "array", 191 "items": { "$ref": "#/definitions/A5" } 192 }, 193 "str": { "type": "string" } 194 } 195 }, 196 "B1": { 197 "type": "object", 198 "allOf": [ 199 { "$ref": "#/definitions/A2" }, 200 { 201 "required": ["req"], 202 "properties": { 203 "req": { "type": "string" }, 204 "opt": { "type": "string" } 205 } 206 } 207 ] 208 }, 209 "B2": { 210 "type": "object", 211 "allOf": [ 212 { "$ref": "#/definitions/A4" }, 213 { 214 "properties": { 215 "key1": { "type": "integer" }, 216 "key2": { "type": "string" } 217 } 218 } 219 ] 220 }, 221 "B3": { 222 "type": "object", 223 "properties": { 224 "name": { "type": "string" } 225 } 226 }, 227 "C1": { 228 "type": "object", 229 "properties": { 230 "id": { "type": "integer" }, 231 "name": { "type": "string" } 232 } 233 }, 234 "C2": { 235 "type": "object", 236 "properties": { 237 "existing": { "$ref": "#/definitions/C3" } 238 } 239 }, 240 "C3": { 241 "type": "object", 242 "required": [ "a" ], 243 "properties": { 244 "a": { "type": "string" }, 245 "b": { "type": "string" } 246 } 247 }, 248 "C4": { 249 "type": "object", 250 "required": [ "a", "b" ], 251 "properties": { 252 "a": { "type": "string" }, 253 "b": { "type": "string" } 254 } 255 } 256 } 257 }