--- swagger: '2.0' info: title: 'fixture for issue #581' version: '1.0' description: | Exercise boundary checks for minimum, maximum and multipleOf For integer parameters with formats int32, uint32 or uint64 - inline - schema objects, with nested array - via $refs produces: - application/json paths: /fixture: get: operationId: op1 parameters: - name: myid in: query schema: $ref: '#/definitions/myId' - name: inlineMaxInt in: query type: integer format: uint64 # Error: boundary inconsistent with format minimum: -100 # Error: Out of bound maximum maximum: 922337203685477580700000000000000000 default: 99 - name: inlineMinInt in: query type: integer format: uint32 # Error: Out of bound minimum minimum: -1 # Error: Out of bound maximum maximum: 4294967296 default: 99 - name: inlineInfiniteInt in: query type: integer format: uint32 minimum: 0 maximum: 2000000 # Errors: invalid default #default: -10000000000000000000000000000000000000000000000000 default: -922 # TODO: not validated since no default value!!! - name: inlineInfiniteInt2 in: query type: integer format: uint32 minimum: 0 maximum: 2000000 # Errors: invalid default default: -4294967296 # TODO: not validated since no default value!!! - name: bigInt in: query type: integer format: int32 # Error: Out of bound factor multipleOf: 4294967296 - name: negFactor in: query type: integer # Allows signed format format: int32 # Error: negative factor (consistent with format) multipleOf: -300 default: -600 - name: negFactor2 in: query type: integer # Allows signed format format: uint32 # Error: consistent with format multipleOf: 3 # Error: fails constraint, but consistent with format default: 2 - name: negFactor3 in: query type: integer # Allows signed format format: uint32 # Error: consistent with format multipleOf: 3 # Error: successful constraint, but inconsistent with format default: -6 responses: 200: responses: 200: description: 'response exercising integer boundaries' schema: $ref: '#/definitions/someIds' definitions: myId: type: object properties: uint8: type: integer minimum: 0 maximum: 255 # Error: default does not validate against boundaries default: 256 int64: type: integer minimum: -9223372036854775808 maximum: 9223372036854775807000 uint64: type: integer minimum: -9223372036854775807000 maximum: 0 # See if detected? default: 1 uint64-wrong: type: integer minimum: 0 maximum: 18446744073709551616 someIds: type: object properties: smallId: type: integer minimum: 0 maximum: 12