Skip to content

Commit

Permalink
Add constraints to form schema (jupytercad#362)
Browse files Browse the repository at this point in the history
Add constraints to number type in form schema
  • Loading branch information
trungleduc authored Jun 6, 2024
1 parent d948402 commit aaf0e39
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/schema/src/schema/box.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@
"properties": {
"Length": {
"type": "number",
"exclusiveMinimum": 0,
"description": "The length of the box"
},
"Width": {
"type": "number",
"exclusiveMinimum": 0,
"description": "The width of the box"
},
"Height": {
"type": "number",
"exclusiveMinimum": 0,
"description": "The height of the box"
},
"Placement": {
Expand Down
2 changes: 2 additions & 0 deletions packages/schema/src/schema/chamfer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
},
"Edge": {
"type": "number",
"minimum": 0,
"description": "The edge index"
},
"Dist": {
"type": "number",
"minimum": 0,
"description": "The distance of the symmetric chamfer"
},
"Placement": {
Expand Down
4 changes: 4 additions & 0 deletions packages/schema/src/schema/cone.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,22 @@
"properties": {
"Radius1": {
"type": "number",
"exclusiveMinimum": 0,
"description": "The bottom radius of the cone"
},
"Radius2": {
"type": "number",
"exclusiveMinimum": 0,
"description": "The top radius of the cone"
},
"Height": {
"type": "number",
"exclusiveMinimum": 0,
"description": "The height of the cone"
},
"Angle": {
"type": "number",
"exclusiveMinimum": 0,
"description": "The angle of the cone"
},
"Placement": {
Expand Down
3 changes: 3 additions & 0 deletions packages/schema/src/schema/cylinder.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@
"properties": {
"Radius": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Radius of the cylinder"
},
"Height": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Height of the cylinder"
},
"Angle": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Angle of the cylinder"
},
"Placement": {
Expand Down
2 changes: 2 additions & 0 deletions packages/schema/src/schema/fillet.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
},
"Edge": {
"type": "number",
"minimum": 0,
"description": "The edge index"
},
"Radius": {
"type": "number",
"exclusiveMinimum": 0,
"description": "The radius for the fillet"
},
"Placement": {
Expand Down
1 change: 1 addition & 0 deletions packages/schema/src/schema/geomCircle.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
},
"Radius": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Radius"
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/schema/src/schema/sphere.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"properties": {
"Radius": {
"type": "number",
"exclusiveMinimum": 0,
"description": "The radius of the sphere"
},
"Angle1": {
Expand Down
2 changes: 2 additions & 0 deletions packages/schema/src/schema/torus.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
"properties": {
"Radius1": {
"type": "number",
"exclusiveMinimum": 0,
"description": "The radius of the torus"
},
"Radius2": {
"type": "number",
"exclusiveMinimum": 0,
"description": "The radius of the torus"
},
"Angle1": {
Expand Down

0 comments on commit aaf0e39

Please sign in to comment.