Skip to content

Commit

Permalink
Give unsigned int schemas explicit minimum value
Browse files Browse the repository at this point in the history
Update tests
  • Loading branch information
GREsau committed Oct 30, 2019
1 parent ae716de commit 3f56d6b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 12 deletions.
12 changes: 12 additions & 0 deletions schemars/tests/expected/schema-openapi3.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,19 @@
"maxItems": {
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"maxLength": {
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"maxProperties": {
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"maximum": {
Expand All @@ -159,16 +162,19 @@
"minItems": {
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"minLength": {
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"minProperties": {
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"minimum": {
Expand Down Expand Up @@ -424,16 +430,19 @@
"maxItems": {
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"maxLength": {
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"maxProperties": {
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"maximum": {
Expand All @@ -444,16 +453,19 @@
"minItems": {
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"minLength": {
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"minProperties": {
"type": "integer",
"format": "uint32",
"minimum": 0.0,
"nullable": true
},
"minimum": {
Expand Down
36 changes: 24 additions & 12 deletions schemars/tests/expected/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,21 +148,24 @@
"integer",
"null"
],
"format": "uint32"
"format": "uint32",
"minimum": 0.0
},
"maxLength": {
"type": [
"integer",
"null"
],
"format": "uint32"
"format": "uint32",
"minimum": 0.0
},
"maxProperties": {
"type": [
"integer",
"null"
],
"format": "uint32"
"format": "uint32",
"minimum": 0.0
},
"maximum": {
"type": [
Expand All @@ -176,21 +179,24 @@
"integer",
"null"
],
"format": "uint32"
"format": "uint32",
"minimum": 0.0
},
"minLength": {
"type": [
"integer",
"null"
],
"format": "uint32"
"format": "uint32",
"minimum": 0.0
},
"minProperties": {
"type": [
"integer",
"null"
],
"format": "uint32"
"format": "uint32",
"minimum": 0.0
},
"minimum": {
"type": [
Expand Down Expand Up @@ -457,21 +463,24 @@
"integer",
"null"
],
"format": "uint32"
"format": "uint32",
"minimum": 0.0
},
"maxLength": {
"type": [
"integer",
"null"
],
"format": "uint32"
"format": "uint32",
"minimum": 0.0
},
"maxProperties": {
"type": [
"integer",
"null"
],
"format": "uint32"
"format": "uint32",
"minimum": 0.0
},
"maximum": {
"type": [
Expand All @@ -485,21 +494,24 @@
"integer",
"null"
],
"format": "uint32"
"format": "uint32",
"minimum": 0.0
},
"minLength": {
"type": [
"integer",
"null"
],
"format": "uint32"
"format": "uint32",
"minimum": 0.0
},
"minProperties": {
"type": [
"integer",
"null"
],
"format": "uint32"
"format": "uint32",
"minimum": 0.0
},
"minimum": {
"type": [
Expand Down

0 comments on commit 3f56d6b

Please sign in to comment.