github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/fixtures/enhancements/2163/fixture-2163.yaml (about) 1 --- 2 swagger: "2.0" 3 info: 4 title: "validations inconsistent with schema type" 5 version: "0.0.1" 6 description: "inconsistent validations" 7 license: 8 name: "Apache 2.0" 9 url: "http://www.apache.org/licenses/LICENSE-2.0.html" 10 definitions: 11 obj: 12 type: object 13 properties: 14 a: 15 type: number 16 format: double 17 maximum: 1000000000 18 minimum: 1 19 pattern: "[-]?\\d+(.\\d{1,2})?" 20 maxLength: 13 21 minLength: 1 22 b: 23 type: string 24 minimum: 13 25 maxLength: 5 26 c: 27 type: string 28 maximum: 144 29 maxLength: 5 30 multipleOf: 12 31 enum: [ 'a', 'b' ] 32 d: 33 type: boolean 34 maximum: 15 35 exclusiveMaximum: true 36 minimum: 1 37 exclusiveMinimum: true 38 minProperties: 12 39 e: 40 type: object 41 maximum: 15 # <- skipped 42 minProperties: 12 # <- implies additional properties 43 uniqueItems: true # <- incompatible: skipped 44 enum: [ {"x": 1} ] 45 ebis: 46 type: object 47 additionalProperties: false 48 minProperties: 1 # <- not skipped (even though not consistent with additionalProperties: false above) 49 enum: [ {} ] # <- skipped? 50 f: 51 type: array 52 uniqueItems: true 53 minimum: 15 54 items: 55 type: object 56 minProperties: 13 57 maximum: 15 58 g: 59 type: integer 60 maximum: 10 61 minimum: 1 62 pattern: "[-]?\\d+(.\\d{1,2})?" 63 maxLength: 13 64 minLength: 1 65 maxProperties: 12 # <- warn: not compatible, skipped 66 67 h: 68 type: array 69 items: 70 type: string 71 minItems: 4 72 uniqueItems: true 73 74 i: 75 type: array 76 items: 77 type: object 78 maxProperties: 5 79 minItems: 4 80 uniqueItems: true 81 82 j: 83 type: array 84 items: 85 type: object 86 additionalProperties: 87 type: array 88 items: 89 type: object 90 minProperties: 1 91 maxItems: 12 92 maxProperties: 5 93 minItems: 4 94 uniqueItems: true 95 96 #h: 97 # type: file 98 # maximum: 10 99 # minimum: 1 100 # pattern: "[-]?\\d+(.\\d{1,2})?" 101 # maxLength: 13 102 # minLength: 1 103 # maxProperties: 12 104 105 paths: 106 /getRecords: 107 get: 108 operationId: getRecords 109 parameters: 110 - name: records 111 in: body 112 required: true 113 schema: 114 $ref: '#/definitions/obj' 115 responses: 116 200: 117 description: "OK"