Skip to content

Commit cb1e98a

Browse files
Update api spec (#1276)
YOYO NEW API SPEC! Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 3bb0145 commit cb1e98a

File tree

1 file changed

+165
-78
lines changed

1 file changed

+165
-78
lines changed

spec.json

Lines changed: 165 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -3920,6 +3920,16 @@
39203920
"summary": "Converts a proprietary CAD format to KCL.",
39213921
"description": "This endpoint is used to convert a proprietary CAD format to KCL. The file passed MUST have feature tree data.\n\nA STEP file does not have feature tree data, so it will not work. A sldprt file does have feature tree data, so it will work.",
39223922
"operationId": "create_proprietary_to_kcl",
3923+
"parameters": [
3924+
{
3925+
"in": "query",
3926+
"name": "code_option",
3927+
"description": "The options to run on the code. By default this is set to `execute`.",
3928+
"schema": {
3929+
"$ref": "#/components/schemas/CodeOption"
3930+
}
3931+
}
3932+
],
39233933
"requestBody": {
39243934
"content": {
39253935
"multipart/form-data": {
@@ -17329,6 +17339,39 @@
1732917339
"country"
1733017340
]
1733117341
},
17342+
"AdjacencyInfo": {
17343+
"description": "Edge info struct (useful for maintaining mappings between edges and faces and adjacent/opposite edges).",
17344+
"type": "object",
17345+
"properties": {
17346+
"adjacent_info": {
17347+
"nullable": true,
17348+
"description": "Adjacent edge and face info.",
17349+
"allOf": [
17350+
{
17351+
"$ref": "#/components/schemas/EdgeInfo"
17352+
}
17353+
]
17354+
},
17355+
"opposite_info": {
17356+
"nullable": true,
17357+
"description": "Opposite edge and face info.",
17358+
"allOf": [
17359+
{
17360+
"$ref": "#/components/schemas/EdgeInfo"
17361+
}
17362+
]
17363+
},
17364+
"original_info": {
17365+
"nullable": true,
17366+
"description": "Original edge id and face info.",
17367+
"allOf": [
17368+
{
17369+
"$ref": "#/components/schemas/EdgeInfo"
17370+
}
17371+
]
17372+
}
17373+
}
17374+
},
1733217375
"Angle": {
1733317376
"description": "An angle, with a specific unit.",
1733417377
"type": "object",
@@ -19805,6 +19848,16 @@
1980519848
}
1980619849
]
1980719850
},
19851+
"CodeOption": {
19852+
"description": "Code option for running and verifying kcl.\n\n<details><summary>JSON schema</summary>\n\n```json { \"title\": \"CodeOption\", \"description\": \"Code option for running and verifying kcl.\", \"type\": \"string\", \"enum\": [ \"parse\", \"execute\", \"cleanup\", \"mock_execute\" ] } ``` </details>",
19853+
"type": "string",
19854+
"enum": [
19855+
"parse",
19856+
"execute",
19857+
"cleanup",
19858+
"mock_execute"
19859+
]
19860+
},
1980819861
"CodeOutput": {
1980919862
"description": "Output of the code being executed.\n\n<details><summary>JSON schema</summary>\n\n```json { \"description\": \"Output of the code being executed.\", \"type\": \"object\", \"properties\": { \"output_files\": { \"description\": \"The contents of the files requested if they were passed.\", \"type\": \"array\", \"items\": { \"$ref\": \"#/components/schemas/OutputFile\" } }, \"stderr\": { \"description\": \"The stderr of the code.\", \"default\": \"\", \"type\": \"string\" }, \"stdout\": { \"description\": \"The stdout of the code.\", \"default\": \"\", \"type\": \"string\" } } } ``` </details>",
1981019863
"type": "object",
@@ -20994,6 +21047,29 @@
2099421047
}
2099521048
]
2099621049
},
21050+
"EdgeInfo": {
21051+
"description": "A list of faces for a specific edge.",
21052+
"type": "object",
21053+
"properties": {
21054+
"edge_id": {
21055+
"description": "The UUID of the id.",
21056+
"type": "string",
21057+
"format": "uuid"
21058+
},
21059+
"faces": {
21060+
"description": "The faces of each edge.",
21061+
"type": "array",
21062+
"items": {
21063+
"type": "string",
21064+
"format": "uuid"
21065+
}
21066+
}
21067+
},
21068+
"required": [
21069+
"edge_id",
21070+
"faces"
21071+
]
21072+
},
2099721073
"EdgeLinesVisible": {
2099821074
"description": "The response from the `EdgeLinesVisible` endpoint.",
2099921075
"type": "object"
@@ -24944,6 +25020,15 @@
2494425020
"description": "Extrude the object along a path.",
2494525021
"type": "object",
2494625022
"properties": {
25023+
"relative_to": {
25024+
"description": "What is this sweep relative to?",
25025+
"default": "sketch_plane",
25026+
"allOf": [
25027+
{
25028+
"$ref": "#/components/schemas/RelativeTo"
25029+
}
25030+
]
25031+
},
2494725032
"sectional": {
2494825033
"description": "If true, the sweep will be broken up into sub-sweeps (extrusions, revolves, sweeps) based on the trajectory path components.",
2494925034
"type": "boolean"
@@ -28459,6 +28544,11 @@
2845928544
"description": "Get a concise description of all of solids edges.",
2846028545
"type": "object",
2846128546
"properties": {
28547+
"edge_id": {
28548+
"description": "Any edge that lies on the extrusion base path.",
28549+
"type": "string",
28550+
"format": "uuid"
28551+
},
2846228552
"object_id": {
2846328553
"description": "The Solid3d object whose info is being queried.",
2846428554
"type": "string",
@@ -28467,11 +28557,12 @@
2846728557
"type": {
2846828558
"type": "string",
2846928559
"enum": [
28470-
"solid3d_get_info"
28560+
"solid3d_get_adjacency_info"
2847128561
]
2847228562
}
2847328563
},
2847428564
"required": [
28565+
"edge_id",
2847528566
"object_id",
2847628567
"type"
2847728568
]
@@ -30359,6 +30450,24 @@
3035930450
"type"
3036030451
]
3036130452
},
30453+
{
30454+
"type": "object",
30455+
"properties": {
30456+
"data": {
30457+
"$ref": "#/components/schemas/Solid3dGetAdjacencyInfo"
30458+
},
30459+
"type": {
30460+
"type": "string",
30461+
"enum": [
30462+
"solid3d_get_adjacency_info"
30463+
]
30464+
}
30465+
},
30466+
"required": [
30467+
"data",
30468+
"type"
30469+
]
30470+
},
3036230471
{
3036330472
"type": "object",
3036430473
"properties": {
@@ -30989,6 +31098,24 @@
3098931098
"type"
3099031099
]
3099131100
},
31101+
{
31102+
"type": "object",
31103+
"properties": {
31104+
"data": {
31105+
"$ref": "#/components/schemas/EdgeInfo"
31106+
},
31107+
"type": {
31108+
"type": "string",
31109+
"enum": [
31110+
"edge_info"
31111+
]
31112+
}
31113+
},
31114+
"required": [
31115+
"data",
31116+
"type"
31117+
]
31118+
},
3099231119
{
3099331120
"type": "object",
3099431121
"properties": {
@@ -31209,30 +31336,12 @@
3120931336
"type": "object",
3121031337
"properties": {
3121131338
"data": {
31212-
"$ref": "#/components/schemas/Solid3dGetInfo"
31213-
},
31214-
"type": {
31215-
"type": "string",
31216-
"enum": [
31217-
"solid3d_get_info"
31218-
]
31219-
}
31220-
},
31221-
"required": [
31222-
"data",
31223-
"type"
31224-
]
31225-
},
31226-
{
31227-
"type": "object",
31228-
"properties": {
31229-
"data": {
31230-
"$ref": "#/components/schemas/SolidInfo"
31339+
"$ref": "#/components/schemas/AdjacencyInfo"
3123131340
},
3123231341
"type": {
3123331342
"type": "string",
3123431343
"enum": [
31235-
"solid_info"
31344+
"adjacency_info"
3123631345
]
3123731346
}
3123831347
},
@@ -33068,6 +33177,25 @@
3306833177
"description": "The response from the `ReconfigureStream` endpoint.",
3306933178
"type": "object"
3307033179
},
33180+
"RelativeTo": {
33181+
"description": "What is the given geometry relative to?",
33182+
"oneOf": [
33183+
{
33184+
"description": "Local/relative to a position centered within the plane being sketched on",
33185+
"type": "string",
33186+
"enum": [
33187+
"sketch_plane"
33188+
]
33189+
},
33190+
{
33191+
"description": "Local/relative to the trajectory curve",
33192+
"type": "string",
33193+
"enum": [
33194+
"trajectory_curve"
33195+
]
33196+
}
33197+
]
33198+
},
3307133199
"RemoveSceneObjects": {
3307233200
"description": "The response from the `RemoveSceneObjects` endpoint.",
3307333201
"type": "object"
@@ -33823,6 +33951,22 @@
3382333951
"description": "The response from the `Solid3dFilletEdge` endpoint.",
3382433952
"type": "object"
3382533953
},
33954+
"Solid3dGetAdjacencyInfo": {
33955+
"description": "Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces) This includes the opposite and adjacent faces and edges.",
33956+
"type": "object",
33957+
"properties": {
33958+
"edges": {
33959+
"description": "Details of each edge.",
33960+
"type": "array",
33961+
"items": {
33962+
"$ref": "#/components/schemas/AdjacencyInfo"
33963+
}
33964+
}
33965+
},
33966+
"required": [
33967+
"edges"
33968+
]
33969+
},
3382633970
"Solid3dGetAllEdgeFaces": {
3382733971
"description": "The response from the `Solid3dGetAllEdgeFaces` command.",
3382833972
"type": "object",
@@ -33885,23 +34029,6 @@
3388534029
"faces"
3388634030
]
3388734031
},
33888-
"Solid3dGetInfo": {
33889-
"description": "Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces)",
33890-
"type": "object",
33891-
"properties": {
33892-
"info": {
33893-
"description": "Details of each face.",
33894-
"allOf": [
33895-
{
33896-
"$ref": "#/components/schemas/SolidInfo"
33897-
}
33898-
]
33899-
}
33900-
},
33901-
"required": [
33902-
"info"
33903-
]
33904-
},
3390534032
"Solid3dGetNextAdjacentEdge": {
3390634033
"description": "The response from the `Solid3dGetNextAdjacentEdge` command.",
3390734034
"type": "object",
@@ -33944,46 +34071,6 @@
3394434071
"description": "The response from the `Solid3dShellFace` endpoint.",
3394534072
"type": "object"
3394634073
},
33947-
"SolidInfo": {
33948-
"description": "Solid info struct (useful for maintaining mappings between edges and faces and adjacent/opposite edges).",
33949-
"type": "object",
33950-
"properties": {
33951-
"bottom_cap_id": {
33952-
"nullable": true,
33953-
"description": "UUID for bottom cap.",
33954-
"type": "string",
33955-
"format": "uuid"
33956-
},
33957-
"common_edges": {
33958-
"description": "A map containing the common faces for all edges.",
33959-
"type": "object",
33960-
"additionalProperties": {
33961-
"type": "array",
33962-
"items": {
33963-
"type": "string",
33964-
"format": "uuid"
33965-
}
33966-
}
33967-
},
33968-
"complementary_edges": {
33969-
"description": "A map containing the adjacent and opposite edge ids of each wall face.",
33970-
"type": "object",
33971-
"additionalProperties": {
33972-
"$ref": "#/components/schemas/ComplementaryEdges"
33973-
}
33974-
},
33975-
"top_cap_id": {
33976-
"nullable": true,
33977-
"description": "UUID for top cap.",
33978-
"type": "string",
33979-
"format": "uuid"
33980-
}
33981-
},
33982-
"required": [
33983-
"common_edges",
33984-
"complementary_edges"
33985-
]
33986-
},
3398734074
"SourcePosition": {
3398834075
"description": "A position in the source code.",
3398934076
"type": "object",

0 commit comments

Comments
 (0)