github.com/rzurga/go-swagger@v0.28.1-0.20211109195225-5d1f453ffa3a/fixtures/enhancements/2444/fixture-2244.yaml (about) 1 swagger: "2.0" 2 info: 3 title: "minProperties and maxProperties validations" 4 version: "0.0.1" 5 paths: 6 "/": 7 post: 8 tags: 9 - hotspot 10 summary: Create a Hotspot 11 operationId: "CreateHotspot" 12 consumes: 13 - application/json 14 produces: 15 - application/json 16 parameters: 17 - in: body 18 name: Hotspot 19 required: false 20 schema: 21 $ref: '#/definitions/hasMinProperties' 22 responses: 23 201: 24 description: Hotspot created. 25 schema: 26 $ref: '#/definitions/hasMaxProperties' 27 400: 28 description: Bad request. 29 schema: 30 $ref: '#/definitions/hasMinMaxProperties' 31 422: 32 description: Unprocessable entity 33 schema: 34 $ref: '#/definitions/mapWithMinMaxProperties' 35 500: 36 description: Unexpected error. 37 schema: 38 $ref: '#/definitions/mapOfIntegersWithMinMaxProperties' 39 502: 40 description: Unexpected error. 41 schema: 42 $ref: '#/definitions/arrayItemsWithMinMaxProperties' 43 44 "/embedded": 45 get: 46 tags: 47 - embedded 48 responses: 49 201: 50 description: minmax 51 schema: 52 type: object 53 additionalProperties: true 54 minProperties: 5 55 maxProperties: 10 56 57 definitions: 58 hasMinProperties: 59 properties: 60 a: 61 type: string 62 minLength: 10 63 additionalProperties: true 64 minProperties: 2 65 66 hasMaxProperties: 67 properties: 68 b: 69 type: string 70 additionalProperties: true 71 maxProperties: 2 72 73 hasMinMaxProperties: 74 properties: 75 c: 76 type: string 77 additionalProperties: true 78 minProperties: 3 79 maxProperties: 5 80 81 mapWithMinMaxProperties: 82 type: object 83 additionalProperties: true 84 minProperties: 3 85 maxProperties: 5 86 87 untypedWithMinMaxProperties: 88 additionalProperties: true 89 minProperties: 3 90 maxProperties: 5 91 92 mapOfIntegersWithMinMaxProperties: 93 type: object 94 minProperties: 3 95 maxProperties: 5 96 additionalProperties: 97 type: integer 98 99 arrayItemsWithMinMaxProperties: 100 type: array 101 items: 102 minProperties: 3 103 maxProperties: 5 104 105 mapOfObjectsWithMinMaxProperties: 106 type: object 107 minProperties: 3 108 maxProperties: 5 109 additionalProperties: 110 $ref: '#/definitions/hasMaxProperties' 111 112 mapOfArraysWithMinMaxProperties: 113 type: object 114 minProperties: 3 115 maxProperties: 5 116 additionalProperties: 117 type: array 118 items: 119 $ref: '#/definitions/hasMaxProperties' 120 121 objectWithMinMaxProperties: 122 type: object 123 required: [b] 124 properties: 125 id: 126 type: string 127 format: uuid 128 b: 129 type: string 130 minLength: 5 131 minProperties: 3 132 maxProperties: 5 133 additionalProperties: 134 $ref: '#/definitions/hasMaxProperties' 135 136 allOfWithMinMaxProperties: 137 allOf: 138 - type: object 139 minProperties: 3 140 maxProperties: 5 141 properties: 142 uid: 143 type: string 144 format: uuid 145 additionalProperties: 146 type: integer 147 format: uint32 148 maximum: 100 149 150 - type: object 151 properties: 152 c: 153 type: string 154 format: date 155