Skip to content

Commit a1d9090

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

File tree

1 file changed

+171
-0
lines changed

1 file changed

+171
-0
lines changed

spec.json

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3912,6 +3912,164 @@
39123912
}
39133913
}
39143914
},
3915+
"/ml/convert/proprietary-to-kcl": {
3916+
"post": {
3917+
"tags": [
3918+
"ml"
3919+
],
3920+
"summary": "Converts a proprietary CAD format to KCL.",
3921+
"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.",
3922+
"operationId": "create_proprietary_to_kcl",
3923+
"requestBody": {
3924+
"content": {
3925+
"multipart/form-data": {
3926+
"schema": {
3927+
"type": "string",
3928+
"format": "binary"
3929+
}
3930+
}
3931+
},
3932+
"required": true
3933+
},
3934+
"responses": {
3935+
"201": {
3936+
"description": "successful creation",
3937+
"headers": {
3938+
"Access-Control-Allow-Credentials": {
3939+
"description": "Access-Control-Allow-Credentials header.",
3940+
"style": "simple",
3941+
"schema": {
3942+
"nullable": true,
3943+
"type": "string"
3944+
}
3945+
},
3946+
"Access-Control-Allow-Headers": {
3947+
"description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.",
3948+
"style": "simple",
3949+
"schema": {
3950+
"nullable": true,
3951+
"type": "string"
3952+
}
3953+
},
3954+
"Access-Control-Allow-Methods": {
3955+
"description": "Access-Control-Allow-Methods header.",
3956+
"style": "simple",
3957+
"schema": {
3958+
"nullable": true,
3959+
"type": "string"
3960+
}
3961+
},
3962+
"Access-Control-Allow-Origin": {
3963+
"description": "Access-Control-Allow-Origin header.",
3964+
"style": "simple",
3965+
"schema": {
3966+
"nullable": true,
3967+
"type": "string"
3968+
}
3969+
},
3970+
"Set-Cookie": {
3971+
"description": "Set-Cookie header.",
3972+
"style": "simple",
3973+
"schema": {
3974+
"nullable": true,
3975+
"type": "string"
3976+
}
3977+
},
3978+
"X-Api-Call-Id": {
3979+
"description": "ID for this request. We return it so that users can report this to us and help us debug their problems.",
3980+
"style": "simple",
3981+
"required": true,
3982+
"schema": {
3983+
"type": "string"
3984+
}
3985+
}
3986+
},
3987+
"content": {
3988+
"application/json": {
3989+
"schema": {
3990+
"$ref": "#/components/schemas/KclModel"
3991+
}
3992+
}
3993+
}
3994+
},
3995+
"4XX": {
3996+
"$ref": "#/components/responses/Error"
3997+
},
3998+
"5XX": {
3999+
"$ref": "#/components/responses/Error"
4000+
}
4001+
}
4002+
},
4003+
"options": {
4004+
"tags": [
4005+
"hidden"
4006+
],
4007+
"summary": "OPTIONS endpoint.",
4008+
"description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.",
4009+
"operationId": "options_create_proprietary_to_kcl",
4010+
"responses": {
4011+
"204": {
4012+
"description": "resource updated",
4013+
"headers": {
4014+
"Access-Control-Allow-Credentials": {
4015+
"description": "Access-Control-Allow-Credentials header.",
4016+
"style": "simple",
4017+
"schema": {
4018+
"nullable": true,
4019+
"type": "string"
4020+
}
4021+
},
4022+
"Access-Control-Allow-Headers": {
4023+
"description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.",
4024+
"style": "simple",
4025+
"schema": {
4026+
"nullable": true,
4027+
"type": "string"
4028+
}
4029+
},
4030+
"Access-Control-Allow-Methods": {
4031+
"description": "Access-Control-Allow-Methods header.",
4032+
"style": "simple",
4033+
"schema": {
4034+
"nullable": true,
4035+
"type": "string"
4036+
}
4037+
},
4038+
"Access-Control-Allow-Origin": {
4039+
"description": "Access-Control-Allow-Origin header.",
4040+
"style": "simple",
4041+
"schema": {
4042+
"nullable": true,
4043+
"type": "string"
4044+
}
4045+
},
4046+
"Set-Cookie": {
4047+
"description": "Set-Cookie header.",
4048+
"style": "simple",
4049+
"schema": {
4050+
"nullable": true,
4051+
"type": "string"
4052+
}
4053+
},
4054+
"X-Api-Call-Id": {
4055+
"description": "ID for this request. We return it so that users can report this to us and help us debug their problems.",
4056+
"style": "simple",
4057+
"required": true,
4058+
"schema": {
4059+
"type": "string"
4060+
}
4061+
}
4062+
}
4063+
},
4064+
"4XX": {
4065+
"$ref": "#/components/responses/Error"
4066+
},
4067+
"5XX": {
4068+
"$ref": "#/components/responses/Error"
4069+
}
4070+
}
4071+
}
4072+
},
39154073
"/ml/kcl/completions": {
39164074
"post": {
39174075
"tags": [
@@ -22995,6 +23153,19 @@
2299523153
"completions"
2299623154
]
2299723155
},
23156+
"KclModel": {
23157+
"description": "The response containing the KCL code.",
23158+
"type": "object",
23159+
"properties": {
23160+
"code": {
23161+
"description": "The KCL code.",
23162+
"type": "string"
23163+
}
23164+
},
23165+
"required": [
23166+
"code"
23167+
]
23168+
},
2299823169
"LeafNode": {
2299923170
"description": "Leaf node information.",
2300023171
"type": "object",

0 commit comments

Comments
 (0)