...

Text file src/github.com/go-openapi/validate/fixtures/validation/fixture-581.yaml

Documentation: github.com/go-openapi/validate/fixtures/validation

     1---
     2swagger: '2.0'
     3info:
     4  title: 'fixture for issue #581'
     5  version: '1.0'
     6  description: |
     7    test verification of overflow on min/max boundary
     8    reproduces the initial reported case,with schema and $refs
     9
    10produces:
    11  - application/json
    12paths:
    13  /fixture:
    14    get:
    15      operationId: op1
    16      parameters:
    17        - name: myid
    18          in: query
    19          schema:
    20            $ref: '#/definitions/myId'
    21      responses:
    22        200:
    23          description: 'response exercising integer boundaries'
    24          schema:
    25            $ref: '#/definitions/someIds'
    26
    27definitions:
    28  myId:
    29    type: object
    30    properties:
    31      uint8:
    32        type: integer
    33        minimum: 0
    34        maximum: 255
    35        # Error: default does not validate against boundaries
    36        default: 256
    37      int64:
    38        type: integer
    39        minimum: -9223372036854775808
    40        # Error: maximum is not an int64
    41        maximum: 9223372036854775807000
    42      uint64:
    43        type: integer
    44        minimum: -9223372036854775807000
    45        maximum: 18446744073709551615
    46      uint64-wrong:
    47        type: integer
    48        minimum: 0
    49        maximum: 18446744073709551616
    50  someIds:
    51    type: object
    52    properties:
    53      smallId:
    54        type: integer
    55        minimum: 0
    56        maximum: 12

View as plain text