Skip to content

Commit

Permalink
fix protobuf min/max constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
sudorandom committed Sep 3, 2024
1 parent 107f7e4 commit a0c9df3
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 92 deletions.
66 changes: 33 additions & 33 deletions internal/converter/fixtures/output/protovalidate.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@
}
},
"doubleLt": {
"exclusiveMaximum": false,
"exclusiveMaximum": 42,
"oneOf": [
{
"type": "string"
Expand All @@ -791,7 +791,7 @@
"maximum": 420
},
"doubleGt": {
"exclusiveMinimum": false,
"exclusiveMinimum": 6.9,
"oneOf": [
{
"type": "string"
Expand All @@ -815,7 +815,7 @@
"minimum": 69
},
"doubleBounds": {
"exclusiveMaximum": false,
"exclusiveMaximum": 10,
"oneOf": [
{
"type": "string"
Expand Down Expand Up @@ -861,7 +861,7 @@
}
},
"int32Lt": {
"exclusiveMaximum": false,
"exclusiveMaximum": 42,
"type": "integer",
"title": "int32_lt"
},
Expand All @@ -871,7 +871,7 @@
"maximum": 420
},
"int32Gt": {
"exclusiveMinimum": false,
"exclusiveMinimum": 6,
"type": "integer",
"title": "int32_gt"
},
Expand All @@ -881,7 +881,7 @@
"minimum": 69
},
"int32Bounds": {
"exclusiveMaximum": false,
"exclusiveMaximum": 10,
"type": "integer",
"title": "int32_bounds",
"minimum": 5
Expand Down Expand Up @@ -940,7 +940,7 @@
}
},
"int64Lt": {
"exclusiveMaximum": false,
"exclusiveMaximum": 42,
"oneOf": [
{
"type": "string"
Expand All @@ -964,7 +964,7 @@
"maximum": 420
},
"int64Gt": {
"exclusiveMinimum": false,
"exclusiveMinimum": 6,
"oneOf": [
{
"type": "string"
Expand All @@ -988,7 +988,7 @@
"minimum": 69
},
"int64Bounds": {
"exclusiveMaximum": false,
"exclusiveMaximum": 10,
"oneOf": [
{
"type": "string"
Expand Down Expand Up @@ -1034,7 +1034,7 @@
}
},
"uint32Lt": {
"exclusiveMaximum": false,
"exclusiveMaximum": 42,
"type": "integer",
"title": "uint32_lt"
},
Expand All @@ -1044,7 +1044,7 @@
"maximum": 420
},
"uint32Gt": {
"exclusiveMinimum": false,
"exclusiveMinimum": 6,
"type": "integer",
"title": "uint32_gt"
},
Expand All @@ -1054,7 +1054,7 @@
"minimum": 69
},
"uint32Bounds": {
"exclusiveMaximum": false,
"exclusiveMaximum": 10,
"type": "integer",
"title": "uint32_bounds",
"minimum": 5
Expand Down Expand Up @@ -1113,7 +1113,7 @@
}
},
"uint64Lt": {
"exclusiveMaximum": false,
"exclusiveMaximum": 42,
"oneOf": [
{
"type": "string"
Expand All @@ -1137,7 +1137,7 @@
"maximum": 420
},
"uint64Gt": {
"exclusiveMinimum": false,
"exclusiveMinimum": 6,
"oneOf": [
{
"type": "string"
Expand All @@ -1161,7 +1161,7 @@
"minimum": 69
},
"uint64Bounds": {
"exclusiveMaximum": false,
"exclusiveMaximum": 10,
"oneOf": [
{
"type": "string"
Expand Down Expand Up @@ -1207,7 +1207,7 @@
}
},
"sint32Lt": {
"exclusiveMaximum": false,
"exclusiveMaximum": 42,
"type": "integer",
"title": "sint32_lt"
},
Expand All @@ -1217,7 +1217,7 @@
"maximum": 420
},
"sint32Gt": {
"exclusiveMinimum": false,
"exclusiveMinimum": 6,
"type": "integer",
"title": "sint32_gt"
},
Expand All @@ -1227,7 +1227,7 @@
"minimum": 69
},
"sint32Bounds": {
"exclusiveMaximum": false,
"exclusiveMaximum": 10,
"type": "integer",
"title": "sint32_bounds",
"minimum": 5
Expand Down Expand Up @@ -1286,7 +1286,7 @@
}
},
"sint64Lt": {
"exclusiveMaximum": false,
"exclusiveMaximum": 42,
"oneOf": [
{
"type": "string"
Expand All @@ -1310,7 +1310,7 @@
"maximum": 420
},
"sint64Gt": {
"exclusiveMinimum": false,
"exclusiveMinimum": 8,
"oneOf": [
{
"type": "string"
Expand All @@ -1334,7 +1334,7 @@
"minimum": 89
},
"sint64Bounds": {
"exclusiveMaximum": false,
"exclusiveMaximum": 10,
"oneOf": [
{
"type": "string"
Expand Down Expand Up @@ -1380,7 +1380,7 @@
}
},
"fixed32Lt": {
"exclusiveMaximum": false,
"exclusiveMaximum": 42,
"type": "integer",
"title": "fixed32_lt"
},
Expand All @@ -1390,7 +1390,7 @@
"maximum": 420
},
"fixed32Gt": {
"exclusiveMinimum": false,
"exclusiveMinimum": 6,
"type": "integer",
"title": "fixed32_gt"
},
Expand All @@ -1400,7 +1400,7 @@
"minimum": 69
},
"fixed32Bounds": {
"exclusiveMaximum": false,
"exclusiveMaximum": 10,
"type": "integer",
"title": "fixed32_bounds",
"minimum": 5
Expand Down Expand Up @@ -1459,7 +1459,7 @@
}
},
"fixed64Lt": {
"exclusiveMaximum": false,
"exclusiveMaximum": 42,
"oneOf": [
{
"type": "string"
Expand All @@ -1483,7 +1483,7 @@
"maximum": 420
},
"fixed64Gt": {
"exclusiveMinimum": false,
"exclusiveMinimum": 10,
"oneOf": [
{
"type": "string"
Expand All @@ -1507,7 +1507,7 @@
"minimum": 109
},
"fixed64Bounds": {
"exclusiveMaximum": false,
"exclusiveMaximum": 10,
"oneOf": [
{
"type": "string"
Expand Down Expand Up @@ -1553,7 +1553,7 @@
}
},
"sfixed32Lt": {
"exclusiveMaximum": false,
"exclusiveMaximum": 42,
"type": "integer",
"title": "sfixed32_lt"
},
Expand All @@ -1563,7 +1563,7 @@
"maximum": 420
},
"sfixed32Gt": {
"exclusiveMinimum": false,
"exclusiveMinimum": 6,
"type": "integer",
"title": "sfixed32_gt"
},
Expand All @@ -1573,7 +1573,7 @@
"minimum": 69
},
"sfixed32Bounds": {
"exclusiveMaximum": false,
"exclusiveMaximum": 10,
"type": "integer",
"title": "sfixed32_bounds",
"minimum": 5
Expand Down Expand Up @@ -1632,7 +1632,7 @@
}
},
"sfixed64Lt": {
"exclusiveMaximum": false,
"exclusiveMaximum": 42,
"oneOf": [
{
"type": "string"
Expand All @@ -1656,7 +1656,7 @@
"maximum": 420
},
"sfixed64Gt": {
"exclusiveMinimum": false,
"exclusiveMinimum": 10,
"oneOf": [
{
"type": "string"
Expand All @@ -1680,7 +1680,7 @@
"minimum": 109
},
"sfixed64Bounds": {
"exclusiveMaximum": false,
"exclusiveMaximum": 10,
"oneOf": [
{
"type": "string"
Expand Down
Loading

0 comments on commit a0c9df3

Please sign in to comment.