github.com/rzurga/go-swagger@v0.28.1-0.20211109195225-5d1f453ffa3a/fixtures/diff/enum.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 "name": "personality", 19 "in": "query", 20 "required": false, 21 "type": "string", 22 "enum":["crazy","empathic","extrovert"] 23 } 24 25 ], 26 "responses": { 27 "200": { 28 "description": "200 response", 29 "schema": { 30 "type": "array", 31 "items": { "$ref": "#/definitions/A1" } 32 } 33 } 34 } 35 }, 36 "post": { 37 "parameters": [ 38 { 39 "name": "", 40 "in": "body", 41 "schema": { "$ref": "#/definitions/A2" } 42 } 43 ], 44 "responses": { 45 "200": { 46 "description": "200 response", 47 "schema": { "$ref": "#/definitions/A3" } 48 } 49 } 50 } 51 }, 52 "/a/{id}": { 53 "get": { 54 "parameters": [ 55 { 56 "name": "flavour", 57 "required": false, 58 "in": "query", 59 "type": "string" 60 }, 61 { 62 "name": "id", 63 "in": "path", 64 "type": "string" 65 } 66 ], 67 "responses": { 68 "200": { 69 "description": "200 response", 70 "schema": { 71 "type": "array", 72 "items": { "$ref": "#/definitions/A1" } 73 } 74 } 75 } 76 }, 77 "post": { 78 "parameters": [ 79 { 80 "name": "", 81 "in": "body", 82 "schema": { "$ref": "#/definitions/A2" } 83 } 84 ], 85 "responses": { 86 "200": { 87 "description": "200 response", 88 "schema": { "$ref": "#/definitions/A3" } 89 } 90 } 91 } 92 }, 93 "/b/": { 94 "get": { 95 "parameters": [ 96 { 97 "name": "limit", 98 "in": "query", 99 "required": false, 100 "type": "integer" 101 } 102 ], 103 "responses": { 104 "200": { 105 "description": "200 response", 106 "schema": { 107 "type": "array", 108 "items": { "$ref": "#/definitions/A1" } 109 } 110 } 111 } 112 }, 113 "post": { 114 "parameters": [ 115 { 116 "name": "", 117 "in": "body", 118 "schema": { "$ref": "#/definitions/A2" } 119 } 120 ], 121 "responses": { 122 "200": { 123 "description": "200 response", 124 "schema": { "$ref": "#/definitions/A3" } 125 } 126 } 127 } 128 } 129 }, 130 "definitions": { 131 "A1": { 132 "type": "object", 133 "properties": { 134 "id": { "type": "integer" }, 135 "name": { "type": "string" }, 136 "personality":{ 137 "type": "string", 138 "enum":["empathic","saucy","sane"] 139 } 140 } 141 }, 142 "A2": { 143 "type": "object", 144 "required": [ "name", "description" ], 145 "properties": { 146 "name": { "type": "string" }, 147 "description": { "type": "string" } 148 } 149 }, 150 "A3": { 151 "type": "object", 152 "properties": { 153 "id": { "type": "integer" }, 154 "name": { "type": "string" }, 155 "description": { "type": "string" }, 156 "letters": { 157 "type": "array", 158 "items": { "type": "string" } 159 }, 160 "attributes": { 161 "type": "object", 162 "additionalProperties": { "type": "string" } 163 } 164 } 165 } 166 } 167 }