POST 校验 TemplateSpec v2 定义
POST /loom/v1/templateSpecs:validate 校验 TemplateSpec v2 定义
所属分组:User Templates · 用户私有模板
Applies the same current contract authority resolution and binding validation used when saving a private template version. This endpoint does not persist a version.
BASE URL
https://router.shengsuanyun.com/api认证方式
Authorization: Bearer YOUR_API_KEY端点列表
POST/loom/v1/templateSpecs:validateValidate a TemplateSpec v2 definition
Applies the same current contract authority resolution and binding validation used when saving a private template version. This endpoint does not persist a version.
请求体 · 必填
TemplateSpec v2 validation request
application/json
| 字段 | 类型 | 说明 |
|---|---|---|
canonicalSpecV2 | object | |
specVersion | string |
{
"canonicalSpecV2": {},
"specVersion": "string"
}请求示例
参考地址:https://loomloom.shengsuanyun.com。路径参数与凭据需替换;非 JSON 请求体需按对应格式准备。
curl -X POST 'https://loomloom.shengsuanyun.com/loom/v1/templateSpecs:validate' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
--data '{
"canonicalSpecV2": {},
"specVersion": "string"
}'响应
200 OK
application/json
| 字段 | 类型 | 说明 |
|---|---|---|
authorityFingerprint | string | |
contractBundleHash | string | |
definitionHash | string | |
primaryOutputType | string | |
valid | boolean |
{
"authorityFingerprint": "string",
"contractBundleHash": "string",
"definitionHash": "string",
"primaryOutputType": "string",
"valid": false
}400 Bad Request
application/json
| 字段 | 类型 | 说明 |
|---|---|---|
code | string | |
error | string |
{
"code": "string",
"error": "string"
}401 Unauthorized
application/json
| 字段 | 类型 | 说明 |
|---|---|---|
code | string | |
error | string |
{
"code": "string",
"error": "string"
}500 Internal Server Error
application/json
| 字段 | 类型 | 说明 |
|---|---|---|
code | string | |
error | string |
{
"code": "string",
"error": "string"
}