Update api spec (#426)

YOYO NEW API SPEC!

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
zoo-github-actions-auth[bot]
2025-04-30 19:47:38 -07:00
committed by GitHub
parent c8a1761f16
commit 2bd736096a

171
spec.json
View File

@ -3912,6 +3912,164 @@
}
}
},
"/ml/convert/proprietary-to-kcl": {
"post": {
"tags": [
"ml"
],
"summary": "Converts a proprietary CAD format to KCL.",
"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.",
"operationId": "create_proprietary_to_kcl",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "string",
"format": "binary"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "successful creation",
"headers": {
"Access-Control-Allow-Credentials": {
"description": "Access-Control-Allow-Credentials header.",
"style": "simple",
"schema": {
"nullable": true,
"type": "string"
}
},
"Access-Control-Allow-Headers": {
"description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.",
"style": "simple",
"schema": {
"nullable": true,
"type": "string"
}
},
"Access-Control-Allow-Methods": {
"description": "Access-Control-Allow-Methods header.",
"style": "simple",
"schema": {
"nullable": true,
"type": "string"
}
},
"Access-Control-Allow-Origin": {
"description": "Access-Control-Allow-Origin header.",
"style": "simple",
"schema": {
"nullable": true,
"type": "string"
}
},
"Set-Cookie": {
"description": "Set-Cookie header.",
"style": "simple",
"schema": {
"nullable": true,
"type": "string"
}
},
"X-Api-Call-Id": {
"description": "ID for this request. We return it so that users can report this to us and help us debug their problems.",
"style": "simple",
"required": true,
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/KclModel"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
},
"options": {
"tags": [
"hidden"
],
"summary": "OPTIONS endpoint.",
"description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.",
"operationId": "options_create_proprietary_to_kcl",
"responses": {
"204": {
"description": "resource updated",
"headers": {
"Access-Control-Allow-Credentials": {
"description": "Access-Control-Allow-Credentials header.",
"style": "simple",
"schema": {
"nullable": true,
"type": "string"
}
},
"Access-Control-Allow-Headers": {
"description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.",
"style": "simple",
"schema": {
"nullable": true,
"type": "string"
}
},
"Access-Control-Allow-Methods": {
"description": "Access-Control-Allow-Methods header.",
"style": "simple",
"schema": {
"nullable": true,
"type": "string"
}
},
"Access-Control-Allow-Origin": {
"description": "Access-Control-Allow-Origin header.",
"style": "simple",
"schema": {
"nullable": true,
"type": "string"
}
},
"Set-Cookie": {
"description": "Set-Cookie header.",
"style": "simple",
"schema": {
"nullable": true,
"type": "string"
}
},
"X-Api-Call-Id": {
"description": "ID for this request. We return it so that users can report this to us and help us debug their problems.",
"style": "simple",
"required": true,
"schema": {
"type": "string"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/Error"
},
"5XX": {
"$ref": "#/components/responses/Error"
}
}
}
},
"/ml/kcl/completions": {
"post": {
"tags": [
@ -22995,6 +23153,19 @@
"completions"
]
},
"KclModel": {
"description": "The response containing the KCL code.",
"type": "object",
"properties": {
"code": {
"description": "The KCL code.",
"type": "string"
}
},
"required": [
"code"
]
},
"LeafNode": {
"description": "Leaf node information.",
"type": "object",