github.com/rzurga/go-swagger@v0.28.1-0.20211109195225-5d1f453ffa3a/fixtures/bugs/1487/fixture-additionalProps.yaml (about) 1 swagger: '2.0' 2 3 info: 4 version: "1.0.0" 5 title: fixture for additionalProperties 6 description: various patterns of additionalProperties 7 produces: 8 - application/json 9 consumes: 10 - application/json 11 paths: 12 /models: 13 get: 14 operationId: modelOp 15 summary: many model variations 16 description: no description 17 tags: 18 - testcgen 19 responses: 20 default: 21 description: Generic Out 22 definitions: 23 additionalThings: 24 type: object 25 required: [ origin ] 26 properties: 27 origin: 28 type: string 29 enum: [ print, e-book, collection, museum ] 30 status: 31 type: string 32 enum: [ OK, KO ] 33 additionalProperties: 34 type: string 35 enum: [ bookshop, amazon, library ] 36 additionalSliceOfObjects: 37 type: object 38 properties: 39 prop1: 40 type: string 41 additionalProperties: 42 type: array 43 uniqueItems: true 44 items: 45 type: object 46 properties: 47 prop2: 48 type: integer 49 additionalSliceOfPrimitives: 50 type: object 51 properties: 52 prop1: 53 type: string 54 additionalProperties: 55 type: array 56 uniqueItems: true 57 items: 58 type: string 59 format: date 60 additionalSliceOfAliasedPrimitives: 61 type: object 62 properties: 63 prop2: 64 type: string 65 format: uuid 66 additionalProperties: 67 type: array 68 maxItems: 10 69 items: 70 $ref: '#/definitions/aliasedDate' 71 additionalSliceOfAliasedNullablePrimitives: 72 type: object 73 properties: 74 prop3: 75 type: string 76 format: uuid 77 additionalProperties: 78 type: array 79 minItems: 10 80 items: 81 $ref: '#/definitions/aliasedNullableDate' 82 additionalSliceOfSlice: 83 type: object 84 properties: 85 prop4: 86 type: string 87 format: uuid 88 additionalProperties: 89 type: array 90 items: 91 type: array 92 maxItems: 10 93 items: 94 type: object 95 uniqueItems: true 96 properties: 97 prop5: 98 type: integer 99 maximum: 10 100 additionalObject: 101 type: object 102 properties: 103 mockId: 104 type: number 105 additionalProperties: 106 type: object 107 required: [ mockB ] 108 properties: 109 mockA: 110 type: string 111 pattern: '^[A-Z]$' 112 mockB: 113 type: string 114 minLength: 1 115 mockC: 116 type: number 117 additionalEmptyObject: 118 type: object 119 properties: 120 # this one is rendered as interface{}: this is debatable 121 propA: 122 type: object 123 additionalProperties: 124 # this one is rendered as map[string]interface{}, which is correct 125 type: object 126 emptyObjectWithAdditionalSlice: 127 type: object 128 additionalProperties: 129 type: array 130 items: 131 type: object 132 properties: 133 dummyProp1: 134 type: string 135 format: date 136 additionalThingsNested: 137 type: object 138 properties: 139 origin: 140 type: string 141 enum: [ goPrint, goE-book, goCollection, goMuseum ] 142 additionalProperties: 143 type: object 144 properties: 145 printerAddress: 146 type: string 147 printerDate: 148 type: string 149 format: date 150 printerCountry: 151 type: string 152 enum: [ "US", "FR", "UK", "BE", "CA", "DE"] 153 additionalProperties: 154 type: object 155 properties: 156 averageDelay: 157 type: string 158 format: duration 159 noValidationThing: 160 type: object 161 additionalProperties: true 162 properties: 163 discourse: 164 type: string 165 hoursSpent: 166 type: number 167 interfaceThing: 168 type: object 169 additionalProperties: true 170 additionalFormatedThing: 171 type: object 172 additionalProperties: 173 type: string 174 format: date 175 aliasedDate: 176 type: string 177 format: date 178 aliasedNullableDate: 179 type: string 180 format: date 181 x-nullable: true 182 additionalObjectWithAliasedThing: 183 type: object 184 properties: 185 blob: 186 type: integer 187 minimum: 1 188 additionalProperties: 189 $ref: '#/definitions/aliasedDate' 190 additionalObjectWithNullableThing: 191 type: object 192 properties: 193 blob: 194 type: integer 195 minimum: 1 196 additionalProperties: 197 $ref: '#/definitions/aliasedNullableDate' 198 additionalDateWithNullableThing: 199 type: object 200 properties: 201 nullableDate: 202 $ref: '#/definitions/aliasedNullableDate' 203 properties: 204 blob: 205 type: integer 206 minimum: 1 207 additionalProperties: 208 $ref: '#/definitions/aliasedNullableDate' 209 additionalObjectWithFormatedThing: 210 type: object 211 required: [ blob ] 212 properties: 213 blob: 214 type: integer 215 minimum: 1 216 additionalProperties: 217 type: string 218 format: date 219 additionalArrayThing: 220 type: object 221 properties: 222 thisOneNotRequired: 223 type: integer 224 maximum: 10 225 additionalProperties: 226 type: array 227 uniqueItems: true 228 items: 229 type: string 230 format: uuid 231 additionalNullableArrayThing: 232 type: object 233 properties: 234 thisOneNotRequired: 235 type: integer 236 maximum: 10 237 additionalProperties: 238 type: array 239 x-nullable: true 240 uniqueItems: true 241 items: 242 type: string 243 format: isbn 244 additionalArrayOfRefedThing: 245 type: object 246 properties: 247 thisOneNotRequired: 248 type: integer 249 maximum: 10 250 additionalProperties: 251 type: array 252 uniqueItems: true 253 items: 254 $ref: '#/definitions/aliasedDate' 255 additionalTransitiveRefedThing: 256 type: object 257 properties: 258 thisOneNotRequired: 259 type: integer 260 maximum: 10 261 additionalProperties: 262 type: array 263 uniqueItems: true 264 items: 265 $ref: '#/definitions/transitiveRefedThing' 266 transitiveRefedThing: 267 type: object 268 properties: 269 thisOneNotRequiredEither: 270 type: integer 271 maximum: 20 272 additionalProperties: 273 type: object 274 properties: 275 a1: 276 type: string 277 format: date-time 278 additionalProperties: 279 $ref: '#/definitions/noValidationThing' 280 additionalArrayOfInterface: 281 type: object 282 properties: 283 thisOneNotRequired: 284 type: integer 285 maximum: 10 286 additionalProperties: 287 type: array 288 uniqueItems: true 289 items: 290 type: object 291 additionalProperties: true 292 additionalArrayOfRefedObject: 293 type: object 294 properties: 295 thisOneNotRequired: 296 type: integer 297 maximum: 10 298 additionalProperties: 299 type: array 300 uniqueItems: true 301 items: 302 $ref: '#/definitions/noValidationThing'