Skip to content

Commit aaf0e39

Browse files
authored
Add constraints to form schema (#362)
Add constraints to number type in form schema
1 parent d948402 commit aaf0e39

File tree

8 files changed

+18
-0
lines changed

8 files changed

+18
-0
lines changed

packages/schema/src/schema/box.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@
77
"properties": {
88
"Length": {
99
"type": "number",
10+
"exclusiveMinimum": 0,
1011
"description": "The length of the box"
1112
},
1213
"Width": {
1314
"type": "number",
15+
"exclusiveMinimum": 0,
1416
"description": "The width of the box"
1517
},
1618
"Height": {
1719
"type": "number",
20+
"exclusiveMinimum": 0,
1821
"description": "The height of the box"
1922
},
2023
"Placement": {

packages/schema/src/schema/chamfer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
},
1212
"Edge": {
1313
"type": "number",
14+
"minimum": 0,
1415
"description": "The edge index"
1516
},
1617
"Dist": {
1718
"type": "number",
19+
"minimum": 0,
1820
"description": "The distance of the symmetric chamfer"
1921
},
2022
"Placement": {

packages/schema/src/schema/cone.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,22 @@
77
"properties": {
88
"Radius1": {
99
"type": "number",
10+
"exclusiveMinimum": 0,
1011
"description": "The bottom radius of the cone"
1112
},
1213
"Radius2": {
1314
"type": "number",
15+
"exclusiveMinimum": 0,
1416
"description": "The top radius of the cone"
1517
},
1618
"Height": {
1719
"type": "number",
20+
"exclusiveMinimum": 0,
1821
"description": "The height of the cone"
1922
},
2023
"Angle": {
2124
"type": "number",
25+
"exclusiveMinimum": 0,
2226
"description": "The angle of the cone"
2327
},
2428
"Placement": {

packages/schema/src/schema/cylinder.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@
77
"properties": {
88
"Radius": {
99
"type": "number",
10+
"exclusiveMinimum": 0,
1011
"description": "Radius of the cylinder"
1112
},
1213
"Height": {
1314
"type": "number",
15+
"exclusiveMinimum": 0,
1416
"description": "Height of the cylinder"
1517
},
1618
"Angle": {
1719
"type": "number",
20+
"exclusiveMinimum": 0,
1821
"description": "Angle of the cylinder"
1922
},
2023
"Placement": {

packages/schema/src/schema/fillet.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
},
1212
"Edge": {
1313
"type": "number",
14+
"minimum": 0,
1415
"description": "The edge index"
1516
},
1617
"Radius": {
1718
"type": "number",
19+
"exclusiveMinimum": 0,
1820
"description": "The radius for the fillet"
1921
},
2022
"Placement": {

packages/schema/src/schema/geomCircle.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
},
5050
"Radius": {
5151
"type": "number",
52+
"exclusiveMinimum": 0,
5253
"description": "Radius"
5354
}
5455
}

packages/schema/src/schema/sphere.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"properties": {
88
"Radius": {
99
"type": "number",
10+
"exclusiveMinimum": 0,
1011
"description": "The radius of the sphere"
1112
},
1213
"Angle1": {

packages/schema/src/schema/torus.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
"properties": {
88
"Radius1": {
99
"type": "number",
10+
"exclusiveMinimum": 0,
1011
"description": "The radius of the torus"
1112
},
1213
"Radius2": {
1314
"type": "number",
15+
"exclusiveMinimum": 0,
1416
"description": "The radius of the torus"
1517
},
1618
"Angle1": {

0 commit comments

Comments
 (0)