1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
---
swagger: '2.0'
info:
title: 'fixture for issue #581'
version: '1.0'
description: |
Exercise boundary checks for minimum, maximum and multipleOf
For integer parameters (as default int64):
- 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
minimum: 0
#maximum: 100
# Error: Out of bound maximum
maximum: 922337203685477580700000000000000000
default: 99
- name: inlineMinInt
in: query
type: integer
minimum: -9223372036854775807000000000000000
# Error: Out of bound minimum
maximum: 1
default: 99
- name: inlineInfiniteInt
in: query
type: integer
# Errors: Out of bound minimum and maximum
minimum: -92233720368547758070000000000000000000000
maximum: 92233720368547758070000000000000000
default: 99
- name: bigInt
in: query
type: integer
# TODO: not validated since no default value!!!
# Error: Out of bound factor
multipleOf: 3922337203685477580700000000000000000000000
# ISSUE: does use native method => use number
- name: negFactor
in: query
type: integer
# Error: negative factor
multipleOf: -300
default: -600
responses:
200:
responses:
200:
description: 'response exercising integer boundaries'
schema:
# TODO: should validate here too
$ref: '#/definitions/someIds'
# TODO: should validate here too
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
|