add validation to ruby model

This commit is contained in:
wing328
2016-04-25 17:07:42 +08:00
parent d225da082c
commit e143c6cd2f
12 changed files with 172 additions and 31 deletions

View File

@@ -761,22 +761,33 @@ definitions:
properties:
integer:
type: integer
maximum: 100
minimum: 10
int32:
type: integer
format: int32
maximum: 200
minimum: 20
int64:
type: integer
format: int64
number:
maximum: 543.2
minimum: 32.1
type: number
float:
type: number
format: float
maximum: 987.6
minimum: 54.3
double:
type: number
format: double
maximum: 123.4
minimum: 67.8
string:
type: string
pattern: /[az]/i
byte:
type: string
format: byte