Skip to content

Commit

Permalink
Update api spec (#234)
Browse files Browse the repository at this point in the history
* YOYO NEW API SPEC!

* I have generated the library!

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
jessfraz and github-actions[bot] authored Aug 31, 2023
1 parent 127e7de commit ce25fe4
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 23 deletions.
20 changes: 16 additions & 4 deletions kittycad/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6821,6 +6821,10 @@ pub enum FileImportFormat {
#[serde(rename = "ply")]
#[display("ply")]
Ply,
#[doc = "SolidWorks part (SLDPRT) format."]
#[serde(rename = "sldprt")]
#[display("sldprt")]
Sldprt,
#[doc = "The STEP file format. <https://en.wikipedia.org/wiki/ISO_10303-21>"]
#[serde(rename = "step")]
#[display("step")]
Expand Down Expand Up @@ -7567,12 +7571,14 @@ pub enum InputFormat {
Fbx {},
#[serde(rename = "gltf")]
Gltf {},
#[serde(rename = "step")]
Step {},
#[serde(rename = "obj")]
Obj { coords: System, units: UnitLength },
#[serde(rename = "ply")]
Ply { coords: System, units: UnitLength },
#[serde(rename = "sldprt")]
Sldprt {},
#[serde(rename = "step")]
Step {},
#[serde(rename = "stl")]
Stl { coords: System, units: UnitLength },
}
Expand Down Expand Up @@ -8685,7 +8691,10 @@ pub enum ModelingCmd {
#[serde(rename = "set_tool")]
SetTool { tool: SceneToolType },
#[serde(rename = "mouse_move")]
MouseMove { window: Point2D },
MouseMove {
sequence: Option<u32>,
window: Point2D,
},
#[serde(rename = "mouse_click")]
MouseClick { window: Point2D },
#[serde(rename = "sketch_mode_enable")]
Expand All @@ -8709,7 +8718,10 @@ pub enum ModelingCmd {
#[serde(rename = "handle_mouse_drag_start")]
HandleMouseDragStart { window: Point2D },
#[serde(rename = "handle_mouse_drag_move")]
HandleMouseDragMove { window: Point2D },
HandleMouseDragMove {
sequence: Option<u32>,
window: Point2D,
},
#[serde(rename = "handle_mouse_drag_end")]
HandleMouseDragEnd { window: Point2D },
}
Expand Down
20 changes: 16 additions & 4 deletions openapitor/tests/types/kittycad.rs.gen
Original file line number Diff line number Diff line change
Expand Up @@ -6711,6 +6711,10 @@ pub enum FileImportFormat {
#[serde(rename = "ply")]
#[display("ply")]
Ply,
#[doc = "SolidWorks part (SLDPRT) format."]
#[serde(rename = "sldprt")]
#[display("sldprt")]
Sldprt,
#[doc = "The STEP file format. <https://en.wikipedia.org/wiki/ISO_10303-21>"]
#[serde(rename = "step")]
#[display("step")]
Expand Down Expand Up @@ -7447,12 +7451,14 @@ pub enum InputFormat {
Fbx {},
#[serde(rename = "gltf")]
Gltf {},
#[serde(rename = "step")]
Step {},
#[serde(rename = "obj")]
Obj { coords: System, units: UnitLength },
#[serde(rename = "ply")]
Ply { coords: System, units: UnitLength },
#[serde(rename = "sldprt")]
Sldprt {},
#[serde(rename = "step")]
Step {},
#[serde(rename = "stl")]
Stl { coords: System, units: UnitLength },
}
Expand Down Expand Up @@ -8541,7 +8547,10 @@ pub enum ModelingCmd {
#[serde(rename = "set_tool")]
SetTool { tool: SceneToolType },
#[serde(rename = "mouse_move")]
MouseMove { window: Point2D },
MouseMove {
sequence: Option<u32>,
window: Point2D,
},
#[serde(rename = "mouse_click")]
MouseClick { window: Point2D },
#[serde(rename = "sketch_mode_enable")]
Expand All @@ -8565,7 +8574,10 @@ pub enum ModelingCmd {
#[serde(rename = "handle_mouse_drag_start")]
HandleMouseDragStart { window: Point2D },
#[serde(rename = "handle_mouse_drag_move")]
HandleMouseDragMove { window: Point2D },
HandleMouseDragMove {
sequence: Option<u32>,
window: Point2D,
},
#[serde(rename = "handle_mouse_drag_end")]
HandleMouseDragEnd { window: Point2D },
}
Expand Down
66 changes: 51 additions & 15 deletions spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -6402,6 +6402,13 @@
],
"type": "string"
},
{
"description": "SolidWorks part (SLDPRT) format.",
"enum": [
"sldprt"
],
"type": "string"
},
{
"description": "The STEP file format. <https://en.wikipedia.org/wiki/ISO_10303-21>",
"enum": [
Expand Down Expand Up @@ -6936,21 +6943,6 @@
],
"type": "object"
},
{
"description": "ISO 10303-21 (STEP) format.",
"properties": {
"type": {
"enum": [
"step"
],
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
{
"description": "Wavefront OBJ format.",
"properties": {
Expand Down Expand Up @@ -7017,6 +7009,36 @@
],
"type": "object"
},
{
"description": "SolidWorks part (SLDPRT) format.",
"properties": {
"type": {
"enum": [
"sldprt"
],
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
{
"description": "ISO 10303-21 (STEP) format.",
"properties": {
"type": {
"enum": [
"step"
],
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
{
"description": "*ST**ereo**L**ithography format.",
"properties": {
Expand Down Expand Up @@ -8877,6 +8899,13 @@
{
"description": "Send a mouse move event.",
"properties": {
"sequence": {
"description": "Logical timestamp. The client should increment this with every event in the current mouse drag. That way, if the events are being sent over an unordered channel, the API can ignore the older events.",
"format": "uint32",
"minimum": 0,
"nullable": true,
"type": "integer"
},
"type": {
"enum": [
"mouse_move"
Expand Down Expand Up @@ -9107,6 +9136,13 @@
{
"description": "Continue dragging mouse.",
"properties": {
"sequence": {
"description": "Logical timestamp. The client should increment this with every event in the current mouse drag. That way, if the events are being sent over an unordered channel, the API can ignore the older events.",
"format": "uint32",
"minimum": 0,
"nullable": true,
"type": "integer"
},
"type": {
"enum": [
"handle_mouse_drag_move"
Expand Down

0 comments on commit ce25fe4

Please sign in to comment.