github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/fixtures/bugs/2587/2587.yaml (about) 1 --- 2 swagger: "2.0" 3 info: 4 description: 'repro issue #2587' 5 title: maxProperties 6 version: "0.0.0" 7 schemes: 8 - http 9 definitions: 10 SomeThing: 11 type: object 12 properties: 13 data: 14 type: object 15 additionalProperties: 16 type: object 17 maxProperties: 20 18 x-nullable: true 19 # x-nullable has no effect 20 NestedThing: 21 type: object 22 properties: 23 data: 24 type: object 25 additionalProperties: # <- is remapped as map[string]interface{}: ok 26 type: object 27 minProperties: 15 28 maxProperties: 20 29 minProperties: 5 # <- should apply validations here: ok now (implied) 30 maxProperties: 10 31 32 SomeTypedThing: 33 type: object 34 properties: 35 data: 36 type: object 37 additionalProperties: 38 type: string 39 maxProperties: 20 40 BasicThing: # <- ok 41 type: object 42 properties: 43 data: # <- interface{}: ok 44 type: object 45 additionalProperties: true 46 maxProperties: 20 47 48 #AliasedThing: # <- don't know how to get is aliased on map 49 # type: object 50 # additionalProperties: 51 52 #EmbeddedThing: 53 # $ref: '#/definitions/SomeThing' 54 #EmbeddedMap: 55 # $ref: '#/definitions/NestedThing' 56 paths: 57 paths: 58 /test: 59 get: 60 responses: 61 200: 62 description: ok 63 schema: 64 $ref: '#/definitions/SomeThing' 65