{ "swagger": "2.0", "info": { "title": "ADDP Standard API", "contact": {}, "version": "1.0" }, "host": "localhost:8110", "basePath": "/api/v1/standard", "paths": { "/catalog-resources/changes": { "get": { "security": [ { "BearerAuth": [] } ], "description": "按不透明游标返回 Metric 的最小摘要变化,仅供 Catalog 服务消费 | Return Metric minimal-summary changes by opaque cursor for the Catalog service only", "produces": [ "application/json" ], "tags": [ "Catalog Integration" ], "summary": "拉取 Standard 五类标准 目录资源变化 | Pull Standard standard catalog resource changes", "parameters": [ { "type": "string", "description": "上次成功提交的不透明游标,空值从历史起点开始 | Opaque cursor committed by the consumer; empty starts from the beginning", "name": "after_cursor", "in": "query" }, { "type": "integer", "description": "批大小,默认 200,最大 500 | Batch size, default 200 and maximum 500", "name": "limit", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CatalogResourceChangesResponse" } }, "400": { "description": "无效游标或批大小 | Invalid cursor or batch size", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "需要认证 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "非 Catalog 服务或权限不足 | Catalog service or permission required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "解析失败 | Resolution failed", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.catalog.read" ] } }, "/cleanup-executions/{execution_id}/result": { "get": { "security": [ { "BearerAuth": [] } ], "description": "仅第一方 unrestricted 租户用户;同时要求本模块专业结果权限、Cleanup公共读取权限及本人子执行归属。不返回SQL、凭据、对象路径或原始错误。 | First-party unrestricted tenant Users only; requires both professional and public Cleanup read permissions and ownership of the child execution. No SQL, credentials, object paths or raw errors.", "produces": [ "application/json" ], "tags": [ "Cleanup" ], "summary": "获取本模块资源回收专业结果 | Get module cleanup professional result", "parameters": [ { "type": "string", "description": "子执行UUID | Child execution UUID", "name": "execution_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/cleanup.Result" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "Conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "503": { "description": "Service Unavailable", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.cleanup_result.read", "system.cleanup.read" ] } }, "/code-sets": { "get": { "security": [ { "BearerAuth": [] } ], "description": "latest_revision 是最高修订号的完整历史展示投影,current_revision 只表示指定时点生效的已发布修订。 | latest_revision contains the complete highest-numbered revision for historical display; current_revision contains only the published revision effective at the requested time.", "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取码值集列表 | List code sets", "parameters": [ { "enum": [ "platform", "tenant_common", "domain" ], "type": "string", "description": "适用范围 | Scope", "name": "scope_type", "in": "query" }, { "type": "integer", "description": "归属业务域 ID,仅 domain 范围适用 | Owning domain ID, only for domain scope", "name": "owner_domain_id", "in": "query" }, { "enum": [ "draft", "in_review", "published", "withdrawn" ], "type": "string", "description": "修订状态 | Revision status", "name": "status", "in": "query" }, { "type": "string", "description": "关键字 | Keyword", "name": "keyword", "in": "query" }, { "type": "string", "description": "生效时点(RFC3339,默认服务端当前时间) | Effective point in time (RFC3339, defaults to server time)", "name": "as_of", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.PaginatedCodeSetResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.code_set.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "description": "首个草稿说明由后端按请求语言记录为“初始创建”,请求不包含 change_summary。 | The server records a localized Initial creation summary; the request does not include change_summary.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "创建码值集及首个草稿修订 | Create code set with initial draft revision", "parameters": [ { "description": "码值集和首个草稿 | Code set and initial draft", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CreateCodeSetRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeSetAggregate" } }, "400": { "description": "编码或请求参数无效,编码错误返回 error_code=invalid_standard_code | Invalid code or request; code errors return error_code=invalid_standard_code", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.code_set.create" ] } }, "/code-sets/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "latest_revision 是最高修订号的完整历史展示投影,current_revision 只表示指定时点生效的已发布修订。 | latest_revision contains the complete highest-numbered revision for historical display; current_revision contains only the published revision effective at the requested time.", "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取码值集聚合 | Get code set aggregate", "parameters": [ { "type": "string", "description": "生效时点(RFC3339,默认服务端当前时间) | Effective point in time (RFC3339, defaults to server time)", "name": "as_of", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeSetAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.code_set.read" ] }, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "更新码值集归属信息 | Update code set ownership", "parameters": [ { "description": "归属信息及并发版本 | Ownership and concurrency version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UpdateCodeSetRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeSetAggregate" } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.code_set.update" ] }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "删除码值集稳定身份 | Delete code set identity", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.code_set.delete" ] } }, "/code-sets/{id}/revisions": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取码值集修订历史 | List code set revisions", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeSetRevision" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.code_set.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "从最近修订创建新草稿 | Create code set draft from latest revision", "parameters": [ { "description": "并发版本和变更说明 | Version and change summary", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CreateCodeSetRevisionRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeSetAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.code_set.update" ] } }, "/code-sets/{id}/revisions/{revision_id}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取码值集修订 | Get code set revision", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeSetRevision" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.code_set.read" ] }, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "更新码值集草稿修订 | Update code set draft revision", "parameters": [ { "description": "完整草稿及并发版本 | Full draft and concurrency version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UpdateCodeSetRevisionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeSetAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.code_set.update" ] } }, "/code-sets/{id}/revisions/{revision_id}/items": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "创建草稿码值项 | Create draft code item", "parameters": [ { "description": "码值项及并发版本 | Code item and concurrency version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CreateCodeItemRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeItemMutationResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.code_set.update" ] } }, "/code-sets/{id}/revisions/{revision_id}/items/{item_id}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "更新草稿码值项 | Update draft code item", "parameters": [ { "description": "码值项及并发版本 | Code item and concurrency version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UpdateCodeItemRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeItemMutationResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.code_set.update" ] }, "delete": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "删除草稿码值项 | Delete draft code item", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ResourceVersionResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.code_set.update" ] } }, "/code-sets/{id}/revisions/{revision_id}/publish": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "发布码值集修订 | Publish code set revision", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeSetAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.code_set.publish" ] } }, "/code-sets/{id}/revisions/{revision_id}/return": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "退回码值集修订 | Return code set revision to draft", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeSetAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.code_set.publish" ] } }, "/code-sets/{id}/revisions/{revision_id}/submit": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "提交码值集修订审核 | Submit code set revision for review", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeSetAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.code_set.update" ] } }, "/code-sets/{id}/revisions/{revision_id}/withdraw": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "撤回码值集发布修订 | Withdraw published code set revision", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeSetAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.code_set.publish" ] } }, "/document-extraction-candidates/{candidate_id}": { "put": { "security": [ { "BearerAuth": [] } ], "description": "仅当候选所在文档、候选类型与编码下恰好一个语义变体,且请求候选为该变体的当前代表时执行单项保留或驳回;多语义变体候选族必须使用原子胜出裁决 | Retains or rejects one candidate only when its document, type, and code identify exactly one semantic variant and the requested candidate is its current representative; multi-variant families require the atomic winner decision", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "裁决文档提炼候选 | Review document extraction candidate", "parameters": [ { "description": "裁决状态及并发版本 | Decision and concurrency version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UpdateDocumentExtractionCandidateRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtractionCandidate" } }, "409": { "description": "历史非代表候选返回 error_code=candidate_representative_stale;多语义变体候选族必须使用胜出裁决,error_code=candidate_family_decision_required;或候选已正式化、并发版本冲突 | Historical non-representative candidate returns error_code=candidate_representative_stale; multi-variant family requires winner decision, error_code=candidate_family_decision_required; or candidate already formalized or version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.update" ] } }, "/document-extraction-candidates/{candidate_id}/formalization": { "post": { "security": [ { "BearerAuth": [] } ], "description": "仅允许已保留且仍是其语义变体当前代表的候选;服务器根据实时比对唯一决定创建 R1 草稿、创建既有标准的新修订草稿或关联内容一致修订,不会提交审核或发布 | Only a retained candidate that remains the current representative of its semantic variant may be formalized; the server uniquely decides whether to create an R1 draft, create a new draft revision, or link an identical revision, and never submits or publishes", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "正式化文档提炼候选 | Formalize document extraction candidate", "parameters": [ { "type": "integer", "description": "候选 ID | Candidate ID", "name": "candidate_id", "in": "path", "required": true }, { "description": "正式化请求 | Formalization request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.FormalizeDocumentExtractionCandidateRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentCandidateFormalizationResponse" } }, "400": { "description": "正式化请求或候选编码无效,编码错误返回 error_code=invalid_standard_code | Invalid formalization request or candidate code; code errors return error_code=invalid_standard_code", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "历史非代表候选返回 error_code=candidate_representative_stale;或候选状态、并发版本、目标工作修订冲突 | Historical non-representative candidate returns error_code=candidate_representative_stale; or candidate state, version, or target work revision conflicts", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-conditional-permissions": [ "standard.glossary.create", "standard.glossary.update", "standard.element.create", "standard.element.update", "standard.code_set.create", "standard.code_set.update", "standard.metric.create", "standard.metric.update" ], "x-addp-required-permissions": [ "standard.document.update" ] } }, "/documents": { "get": { "security": [ { "BearerAuth": [] } ], "description": "latest_revision 是最高修订号的完整历史展示投影,current_revision 只表示指定时点生效的已发布修订。 | latest_revision contains the complete highest-numbered revision for historical display; current_revision contains only the published revision effective at the requested time.", "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取标准文档列表 | List standard documents", "parameters": [ { "enum": [ "platform", "tenant_common", "domain" ], "type": "string", "description": "适用范围 | Scope", "name": "scope_type", "in": "query" }, { "type": "integer", "description": "归属业务域 ID | Owning domain ID", "name": "owner_domain_id", "in": "query" }, { "enum": [ "draft", "in_review", "published", "withdrawn" ], "type": "string", "description": "修订状态 | Revision status", "name": "status", "in": "query" }, { "type": "string", "description": "生效时点(RFC3339) | Effective point in time (RFC3339)", "name": "as_of", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.PaginatedDocumentResponse" } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "description": "首次创建说明由服务端按请求语言生成,请求不包含 change_summary。 | Initial creation summary is generated by the server in the request language; change_summary is not accepted.", "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "创建标准文档 | Create standard document", "parameters": [ { "description": "文档身份和首个草稿修订 | Document identity and initial draft revision", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CreateDocumentRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentAggregate" } }, "400": { "description": "编码或请求参数无效,编码错误返回 error_code=invalid_standard_code | Invalid code or request; code errors return error_code=invalid_standard_code", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.create" ] } }, "/documents/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "latest_revision 是最高修订号的完整历史展示投影,current_revision 只表示指定时点生效的已发布修订。 | latest_revision contains the complete highest-numbered revision for historical display; current_revision contains only the published revision effective at the requested time.", "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取标准文档详情 | Get standard document detail", "parameters": [ { "type": "string", "description": "生效时点(RFC3339) | Effective point in time (RFC3339)", "name": "as_of", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentAggregate" } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.read" ] }, "put": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "更新标准文档 | Update standard document", "parameters": [ { "description": "更新标准文档 | Update standard document", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UpdateDocumentRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentAggregate" } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.update" ] }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "删除标准文档 | Delete standard document", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.delete" ] } }, "/documents/{id}/extraction-candidate-families": { "get": { "security": [ { "BearerAuth": [] } ], "description": "按候选类型和稳定编码组织独立语义变体并按候选族分页;total 为筛选后的候选族数,variant_total 为筛选后的语义变体数,variant_status_counts 为不受筛选影响的文档全量变体状态计数,family_comparison_counts 为应用状态、类型和关键词但不应用比对结果筛选的候选族分面计数;族内只返回命中筛选的独立变体及其出现记录和动态标准比对,不合并语义指纹或改写原始事实 | Organizes independent semantic variants by candidate type and stable code and paginates candidate families; total is the filtered family count, variant_total is the filtered semantic-variant count, variant_status_counts covers all document variants regardless of filters, and family_comparison_counts applies state, type, and keyword filters but ignores the comparison-result filter; each family returns only matched independent variants with occurrences and live standard comparisons without merging fingerprints or rewriting source facts", "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取标准提炼候选族视图 | List standard extraction candidate families", "parameters": [ { "enum": [ "pending", "retained", "rejected", "formalized" ], "type": "string", "description": "聚合状态 | Group state", "name": "state", "in": "query" }, { "enum": [ "glossary", "element", "code_set", "metric" ], "type": "string", "description": "候选类型 | Candidate type", "name": "candidate_type", "in": "query" }, { "type": "string", "description": "代表候选编码或名称关键词,忽略大小写并规范化空白 | Representative candidate code or name keyword, case-insensitive with normalized whitespace", "name": "keyword", "in": "query" }, { "enum": [ "new", "exact", "content_conflict", "scope_conflict" ], "type": "string", "description": "与当前标准的实时比对结果 | Live comparison result against current standards", "name": "comparison_result", "in": "query" }, { "type": "integer", "description": "页码,默认 1 | Page number, default 1", "name": "page", "in": "query" }, { "type": "integer", "description": "每页数量,默认 20,最大 100 | Page size, default 20, maximum 100", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.PaginatedDocumentExtractionCandidateFamilyResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.read" ] } }, "/documents/{id}/extraction-candidate-family-decisions": { "get": { "security": [ { "BearerAuth": [] } ], "description": "按事件 ID 倒序分页返回指定候选族的追加式不可变裁决事实;每条事件冻结理由、胜出候选、操作者以及全部成员的裁决后快照 | Returns append-only immutable decision facts for one candidate family, ordered by event ID descending; each event freezes the reason, winner, actor, and post-decision snapshots of all members", "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取标准候选族裁决历史 | List standard candidate family decision history", "parameters": [ { "type": "integer", "description": "文档 ID | Document ID", "name": "id", "in": "path", "required": true }, { "enum": [ "glossary", "element", "code_set", "metric" ], "type": "string", "description": "候选类型 | Candidate type", "name": "candidate_type", "in": "query", "required": true }, { "type": "string", "description": "候选族稳定编码 | Candidate family stable code", "name": "code", "in": "query", "required": true }, { "type": "integer", "description": "页码,默认 1 | Page number, default 1", "name": "page", "in": "query" }, { "type": "integer", "description": "每页数量,默认 20,最大 100 | Page size, default 20, maximum 100", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.PaginatedDocumentCandidateFamilyDecisionResponse" } }, "400": { "description": "候选类型、编码或分页参数无效,error_code=candidate_family_decision_invalid | Invalid candidate type, code, or pagination; error_code=candidate_family_decision_invalid", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.read" ] } }, "/documents/{id}/extraction-candidates/batch_decide": { "post": { "security": [ { "BearerAuth": [] } ], "description": "提交候选族完整读取快照令牌、唯一胜出代表候选和人工理由;服务端在文档锁内重算当前全部代表候选与令牌,保留胜出候选、驳回其余候选并追加不可变裁决事件 | Submits the complete family snapshot token, sole winning representative, and human reason; under the document lock, the server recomputes all current representatives and the token, retains the winner, rejects the others, and appends an immutable decision event", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "原子裁决文档候选族 | Atomically decide a document candidate family", "parameters": [ { "type": "integer", "description": "文档 ID | Document ID", "name": "id", "in": "path", "required": true }, { "description": "候选族快照令牌、胜出候选及 1–1000 字符人工理由 | Family snapshot token, winner, and a 1–1000 character human reason", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DecideDocumentCandidateFamilyRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentCandidateFamilyDecisionResponse" } }, "400": { "description": "理由、快照令牌格式或胜出候选无效,error_code=candidate_family_decision_invalid | Invalid reason, snapshot token format, or winner; error_code=candidate_family_decision_invalid", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "快照令牌过期返回 error_code=candidate_family_snapshot_stale;或候选已正式化 | Stale snapshot token returns error_code=candidate_family_snapshot_stale; or a candidate is already formalized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.update" ] } }, "/documents/{id}/mappings": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取文档关联映射 | Get document mappings", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.read" ] }, "put": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "设置文档关联映射 | Set document mappings", "parameters": [ { "description": "关联映射及当前文档版本 | Mappings with current document version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.SetDocumentMappingsRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.update" ] } }, "/documents/{id}/revisions": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取文档修订历史 | List document revisions", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentRevision" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "创建文档草稿修订 | Create document draft revision", "parameters": [ { "description": "并发版本和变更说明 | Version and change summary", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CreateDocumentRevisionRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentAggregate" } }, "409": { "description": "Conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.update" ] } }, "/documents/{id}/revisions/{revision_id}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取文档修订 | Get document revision", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentRevision" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.read" ] }, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "更新文档草稿修订 | Update document draft revision", "parameters": [ { "description": "完整草稿及并发版本 | Full draft and concurrency version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UpdateDocumentRevisionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentAggregate" } }, "409": { "description": "Conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.update" ] } }, "/documents/{id}/revisions/{revision_id}/extractions": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "从文档修订提炼标准候选 | Extract standard candidates from document revision", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CreateDocumentExtractionRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtraction" } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "Conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "413": { "description": "Request Entity Too Large", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "422": { "description": "文档格式、提炼结果或业务域编码命名空间无效 | Invalid document format, extraction result, or domain code namespace", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "Internal Server Error", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "503": { "description": "Service Unavailable", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document_extraction.create" ] } }, "/documents/{id}/revisions/{revision_id}/file": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "下载文档文件 | Download document file", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "Not Found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "502": { "description": "Bad Gateway", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "resource_ticket", "x-addp-required-permissions": [ "standard.document.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "上传文档修订文件 | Upload document revision file", "parameters": [ { "type": "integer", "description": "当前文档资源版本 | Current document resource version", "name": "version", "in": "formData", "required": true }, { "type": "file", "description": "文档文件 | Document file", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "413": { "description": "Request Entity Too Large", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "502": { "description": "Bad Gateway", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.update" ] } }, "/documents/{id}/revisions/{revision_id}/publish": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "发布文档修订 | Publish document revision", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.publish" ] } }, "/documents/{id}/revisions/{revision_id}/return": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "退回文档修订 | Return document revision to draft", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.publish" ] } }, "/documents/{id}/revisions/{revision_id}/submit": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "提交文档修订审核 | Submit document revision for review", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.update" ] } }, "/documents/{id}/revisions/{revision_id}/withdraw": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "撤回文档发布修订 | Withdraw published document revision", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.document.publish" ] } }, "/domains": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取业务域列表 | List business domains", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_service.DomainTree" } } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.domain.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "创建业务域 | Create business domain", "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.Domain" } }, "400": { "description": "编码或请求参数无效,编码错误返回 error_code=invalid_standard_code | Invalid code or request; code errors return error_code=invalid_standard_code", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.domain.create" ] } }, "/domains/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取业务域详情 | Get business domain detail", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.domain.read" ] }, "put": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "更新业务域 | Update business domain", "parameters": [ { "description": "更新业务域 | Update business domain", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UpdateDomainRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.domain.update" ] }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "删除业务域 | Delete business domain", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.VersionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "400": { "description": "请求无效 | Invalid request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "404": { "description": "业务域不存在 | Business domain not found", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "资源版本冲突或仍被 Model 引用 | Resource version conflict or still referenced by Model", "schema": { "type": "object", "additionalProperties": true } }, "503": { "description": "Model 引用删除屏障不可用 | Model reference deletion guard unavailable", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.domain.delete" ] } }, "/elements": { "get": { "security": [ { "BearerAuth": [] } ], "description": "latest_revision 是最高修订号的完整历史展示投影,current_revision 只表示指定时点生效的已发布修订。 | latest_revision contains the complete highest-numbered revision for historical display; current_revision contains only the published revision effective at the requested time.", "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取数据元列表 | List data elements", "parameters": [ { "type": "string", "description": "数据元 ID 集合,逗号分隔,最多 100 个 | Data element IDs, comma-separated, maximum 100", "name": "ids", "in": "query" }, { "enum": [ "platform", "tenant_common", "domain" ], "type": "string", "description": "适用范围 | Scope", "name": "scope_type", "in": "query" }, { "type": "integer", "description": "归属业务域 ID,仅 domain 范围适用 | Owning domain ID, only for domain scope", "name": "owner_domain_id", "in": "query" }, { "enum": [ "draft", "in_review", "published", "withdrawn" ], "type": "string", "description": "修订状态 | Revision status", "name": "status", "in": "query" }, { "type": "string", "description": "关键字 | Keyword", "name": "keyword", "in": "query" }, { "type": "string", "description": "生效时点(RFC3339,默认服务端当前时间) | Effective point in time (RFC3339, defaults to server time)", "name": "as_of", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.PaginatedElementResponse" } }, "400": { "description": "请求无效 | Invalid request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "description": "首个草稿的变更说明由后端按请求语言自动记录为“初始创建”,请求不包含 change_summary;后续修订仍必填。 | The server records a localized Initial creation summary for the first draft. The request does not include change_summary; subsequent revisions still require it.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "创建数据元及首个草稿修订 | Create data element with initial draft revision", "parameters": [ { "description": "数据元和首个草稿 | Data element and initial draft", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CreateElementRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ElementAggregate" } }, "400": { "description": "编码或请求参数无效,编码错误返回 error_code=invalid_standard_code | Invalid code or request; code errors return error_code=invalid_standard_code", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.create" ] } }, "/elements/standard_references": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Domain References" ], "summary": "查询业务域标准引用(element) | List domain standard references (element)", "parameters": [ { "type": "string", "description": "精确业务域 ID | Exact domain ID", "name": "domain_id", "in": "query", "required": true }, { "type": "integer", "default": 1, "description": "页码 | Page", "name": "page", "in": "query" }, { "type": "integer", "default": 20, "description": "每页条数,上限100 | Page size, max 100", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domainreference.Page" } }, "400": { "description": "查询无效 | Invalid query", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "未认证 | Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权查看 | Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "读取失败 | Read failed", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.read" ] } }, "/elements/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "latest_revision 是最高修订号的完整历史展示投影,current_revision 只表示指定时点生效的已发布修订。 | latest_revision contains the complete highest-numbered revision for historical display; current_revision contains only the published revision effective at the requested time.", "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取数据元聚合 | Get data element aggregate", "parameters": [ { "type": "string", "description": "生效时点(RFC3339,默认服务端当前时间) | Effective point in time (RFC3339, defaults to server time)", "name": "as_of", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ElementAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.read" ] }, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "更新数据元归属信息 | Update data element ownership", "parameters": [ { "description": "归属信息及并发版本 | Ownership and concurrency version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UpdateElementRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ElementAggregate" } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.update" ] }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "删除数据元稳定身份 | Delete data element identity", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "仍被引用 | Still referenced", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.delete" ] } }, "/elements/{id}/documents": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "查询数据元关联的文档 | List documents by element", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentAggregate" } } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.read", "standard.document.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "description": "首次创建说明由服务端按请求语言生成,请求不包含 change_summary。 | Initial creation summary is generated by the server in the request language; change_summary is not accepted.", "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "创建文档并关联到数据元 | Create and link document to element", "parameters": [ { "description": "文档信息及当前数据元版本 | Document with current element version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CreateLinkedDocumentRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentAggregate" } }, "400": { "description": "编码、标识或请求参数无效,编码错误返回 error_code=invalid_standard_code | Invalid code, identifier, or request; code errors return error_code=invalid_standard_code", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.update", "standard.document.create" ] } }, "/elements/{id}/documents/link": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "关联已有文档到数据元 | Link document to element", "parameters": [ { "description": "文档 ID 及当前数据元版本 | Document ID with current element version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.LinkDocumentRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.update", "standard.document.update" ] } }, "/elements/{id}/documents/{doc_id}": { "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "解除文档与数据元的关联 | Unlink document from element", "parameters": [ { "description": "当前数据元版本 | Current element version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.VersionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.update", "standard.document.update" ] } }, "/elements/{id}/quality-rules": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取指定时点生效的数据元质量规则快照 | Get the effective element quality rule snapshot at a point in time", "parameters": [ { "type": "string", "description": "生效时点(RFC3339,默认服务端当前时间) | Effective point in time (RFC3339, defaults to server time)", "name": "as_of", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.PublishedElementQualityRulesResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.read" ] } }, "/elements/{id}/revisions": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取数据元修订历史 | List data element revisions", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ElementRevision" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "从最近修订创建新草稿 | Create a new draft from latest revision", "parameters": [ { "description": "并发版本和变更说明 | Version and change summary", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CreateElementRevisionRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ElementAggregate" } }, "409": { "description": "草稿已存在或版本冲突 | Draft exists or version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.update" ] } }, "/elements/{id}/revisions/{revision_id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "返回指定修订及其固定码值集修订和码项;历史修订不追随当前版本 | Returns the exact revision and its pinned code-set revision and items; historical revisions never track the current version", "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取数据元修订 | Get data element revision", "parameters": [ { "type": "integer", "description": "数据元 ID | Element ID", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "精确修订 ID | Exact revision ID", "name": "revision_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_service.ElementRevisionDetail" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.read" ] }, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "更新数据元草稿修订 | Update data element draft revision", "parameters": [ { "description": "完整草稿及并发版本 | Full draft and concurrency version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UpdateElementRevisionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ElementAggregate" } }, "409": { "description": "状态或版本冲突 | State or version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.update" ] } }, "/elements/{id}/revisions/{revision_id}/publish": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "发布数据元修订 | Publish data element revision", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ElementAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.publish" ] } }, "/elements/{id}/revisions/{revision_id}/return": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "退回数据元修订 | Return data element revision to draft", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ElementAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.publish" ] } }, "/elements/{id}/revisions/{revision_id}/submit": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "提交数据元修订审核 | Submit data element revision for review", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ElementAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.update" ] } }, "/elements/{id}/revisions/{revision_id}/withdraw": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "撤回数据元发布修订 | Withdraw published data element revision", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ElementAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.publish" ] } }, "/execution-read-scope": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Execution diagnostics" ], "summary": "获取执行读取范围 | Get execution read scope", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/execution.ReadScope" } }, "403": { "description": "Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "authenticated" } }, "/glossaries": { "get": { "security": [ { "BearerAuth": [] } ], "description": "同时返回工作修订、当前生效修订与最新历史修订;管理展示按此顺序选择,撤回历史仍保留名称与定义。 | Returns working, currently effective, and latest historical revisions. Management views use that order and retain withdrawn names and definitions.", "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取业务术语列表 | List glossaries", "parameters": [ { "type": "integer", "description": "关联数据元 ID | Related data element ID", "name": "element_id", "in": "query" }, { "enum": [ "platform", "tenant_common", "domain" ], "type": "string", "description": "适用范围 | Scope", "name": "scope_type", "in": "query" }, { "type": "integer", "description": "归属业务域 ID,仅 domain 范围适用 | Owning domain ID, only for domain scope", "name": "owner_domain_id", "in": "query" }, { "enum": [ "draft", "in_review", "published", "withdrawn" ], "type": "string", "description": "修订状态 | Revision status", "name": "status", "in": "query" }, { "type": "string", "description": "关键字 | Keyword", "name": "keyword", "in": "query" }, { "type": "string", "description": "生效时点(RFC3339,默认服务端当前时间) | Effective point in time (RFC3339, defaults to server time)", "name": "as_of", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.PaginatedGlossaryResponse" } }, "400": { "description": "请求无效 | Invalid request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "description": "首个草稿的变更说明由后端按请求语言自动记录为“初始创建”,请求不包含 change_summary;后续修订仍必填。 | The server records a localized Initial creation summary for the first draft. The request does not include change_summary; subsequent revisions still require it.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "创建业务术语及首个草稿修订 | Create glossary with initial draft revision", "parameters": [ { "description": "业务术语和首个草稿 | Glossary and initial draft", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CreateGlossaryRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.GlossaryAggregate" } }, "400": { "description": "编码或请求参数无效,编码错误返回 error_code=invalid_standard_code | Invalid code or request; code errors return error_code=invalid_standard_code", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.create" ] } }, "/glossaries/standard_references": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Domain References" ], "summary": "查询业务域标准引用(glossary) | List domain standard references (glossary)", "parameters": [ { "type": "string", "description": "精确业务域 ID | Exact domain ID", "name": "domain_id", "in": "query", "required": true }, { "type": "integer", "default": 1, "description": "页码 | Page", "name": "page", "in": "query" }, { "type": "integer", "default": 20, "description": "每页条数,上限100 | Page size, max 100", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domainreference.Page" } }, "400": { "description": "查询无效 | Invalid query", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "未认证 | Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权查看 | Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "读取失败 | Read failed", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.read" ] } }, "/glossaries/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "latest_revision 是最高修订号的历史展示投影,current_revision 只表示指定时点生效的已发布修订。 | latest_revision is the highest-numbered revision for historical display; current_revision only represents a published revision effective at the requested time.", "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取业务术语聚合 | Get glossary aggregate", "parameters": [ { "type": "string", "description": "生效时点(RFC3339,默认服务端当前时间) | Effective point in time (RFC3339, defaults to server time)", "name": "as_of", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.GlossaryAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.read" ] }, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "更新业务术语归属信息 | Update glossary ownership", "parameters": [ { "description": "归属信息及并发版本 | Ownership and concurrency version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UpdateGlossaryRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.GlossaryAggregate" } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.update" ] }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "删除从未发布的业务术语 | Delete a never-published glossary", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "存在发布历史 | Publication history exists", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.delete" ] } }, "/glossaries/{id}/documents": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "查询术语关联的文档 | List documents by glossary", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentAggregate" } } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.read", "standard.document.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "description": "首次创建说明由服务端按请求语言生成,请求不包含 change_summary。 | Initial creation summary is generated by the server in the request language; change_summary is not accepted.", "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "创建文档并关联到术语 | Create and link document to glossary", "parameters": [ { "description": "文档信息及当前术语版本 | Document with current glossary version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CreateLinkedDocumentRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentAggregate" } }, "400": { "description": "编码、标识或请求参数无效,编码错误返回 error_code=invalid_standard_code | Invalid code, identifier, or request; code errors return error_code=invalid_standard_code", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.update", "standard.document.create" ] } }, "/glossaries/{id}/documents/link": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "关联已有文档到术语 | Link document to glossary", "parameters": [ { "description": "文档 ID 及当前术语版本 | Document ID with current glossary version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.LinkDocumentRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.update", "standard.document.update" ] } }, "/glossaries/{id}/documents/{doc_id}": { "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "解除文档与术语的关联 | Unlink document from glossary", "parameters": [ { "description": "当前术语版本 | Current glossary version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.VersionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.update", "standard.document.update" ] } }, "/glossaries/{id}/elements": { "get": { "security": [ { "BearerAuth": [] } ], "description": "完整返回关联身份,展示修订与当前生效标记独立;不因修订状态隐藏关联 | Return all associated identities with display revision and independent effectiveness; revision status never hides associations", "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取术语关联的数据元 | Get element mappings of glossary", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.GlossaryElementReference" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.read", "standard.element.read" ] }, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "替换术语关联的数据元 | Replace element mappings of glossary", "parameters": [ { "description": "数据元身份及并发版本 | Element identities and concurrency version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UpdateGlossaryElementsRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.GlossaryAggregate" } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.update", "standard.element.read" ] } }, "/glossaries/{id}/revisions": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取业务术语修订历史 | List glossary revisions", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.GlossaryRevision" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "从最近修订创建新草稿 | Create a new glossary draft from latest revision", "parameters": [ { "description": "并发版本和变更说明 | Version and change summary", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CreateGlossaryRevisionRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.GlossaryAggregate" } }, "409": { "description": "草稿已存在或版本冲突 | Draft exists or version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.update" ] } }, "/glossaries/{id}/revisions/{revision_id}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取业务术语修订 | Get glossary revision", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.GlossaryRevision" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.read" ] }, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "更新业务术语草稿修订 | Update glossary draft revision", "parameters": [ { "description": "完整草稿及并发版本 | Full draft and concurrency version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UpdateGlossaryRevisionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.GlossaryAggregate" } }, "409": { "description": "状态或版本冲突 | State or version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.update" ] } }, "/glossaries/{id}/revisions/{revision_id}/publish": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "发布业务术语修订 | Publish glossary revision", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.GlossaryAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.publish" ] } }, "/glossaries/{id}/revisions/{revision_id}/return": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "退回业务术语修订 | Return glossary revision to draft", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.GlossaryAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.publish" ] } }, "/glossaries/{id}/revisions/{revision_id}/submit": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "提交业务术语修订审核 | Submit glossary revision for review", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.GlossaryAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.update" ] } }, "/glossaries/{id}/revisions/{revision_id}/withdraw": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "撤回业务术语发布修订 | Withdraw published glossary revision", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.GlossaryAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.glossary.publish" ] } }, "/measurement-categories": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取度量类别列表 | List measurement categories", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MeasurementCategory" } } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.unit.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "创建度量类别 | Create measurement category", "parameters": [ { "description": "度量类别 | Measurement category", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CreateMeasurementCategoryRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MeasurementCategory" } }, "400": { "description": "编码或请求参数无效,编码错误返回 error_code=invalid_standard_code | Invalid code or request; code errors return error_code=invalid_standard_code", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.unit.create" ] } }, "/measurement-categories/{id}": { "put": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "更新度量类别 | Update measurement category", "parameters": [ { "description": "更新度量类别 | Update measurement category", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UpdateMeasurementCategoryRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MeasurementCategory" } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.unit.update" ] }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "删除度量类别 | Delete measurement category", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "Conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.unit.delete" ] } }, "/metric-categories": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取指标分类列表 | List metric categories", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricCategory" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "创建指标分类 | Create metric category", "parameters": [ { "description": "指标分类 | Metric category", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CreateMetricCategoryRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricCategory" } }, "400": { "description": "编码或请求参数无效,编码错误返回 error_code=invalid_standard_code | Invalid code or request; code errors return error_code=invalid_standard_code", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.create" ] } }, "/metric-categories/{id}": { "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "更新指标分类 | Update metric category", "parameters": [ { "description": "完整分类及并发版本 | Full category and concurrency version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UpdateMetricCategoryRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricCategory" } }, "409": { "description": "版本冲突 | Version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.update" ] }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "删除指标分类 | Delete metric category", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.delete" ] } }, "/metrics": { "get": { "security": [ { "BearerAuth": [] } ], "description": "latest_revision 是最高修订号的完整历史展示投影,current_revision 只表示指定时点生效的已发布修订。 | latest_revision contains the complete highest-numbered revision for historical display; current_revision contains only the published revision effective at the requested time.", "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取指标定义列表 | List metric definitions", "parameters": [ { "type": "integer", "description": "分类 ID | Category ID", "name": "category_id", "in": "query" }, { "type": "integer", "description": "归属业务域 ID | Owning domain ID", "name": "owner_domain_id", "in": "query" }, { "enum": [ "platform", "tenant_common", "domain" ], "type": "string", "description": "适用范围 | Scope", "name": "scope_type", "in": "query" }, { "enum": [ "atomic", "derived", "composite" ], "type": "string", "description": "指标类型 | Metric type", "name": "metric_type", "in": "query" }, { "enum": [ "draft", "in_review", "published", "withdrawn" ], "type": "string", "description": "修订状态 | Revision status", "name": "status", "in": "query" }, { "type": "string", "description": "关键字 | Keyword", "name": "keyword", "in": "query" }, { "type": "string", "description": "生效时点 | Effective point in time", "name": "as_of", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.PaginatedMetricResponse" } }, "400": { "description": "请求无效 | Invalid request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "description": "首次创建说明由服务端按请求语言生成,请求不包含 change_summary。 | Initial creation summary is generated by the server in the request language; change_summary is not accepted.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "创建指标定义及首个草稿修订 | Create metric definition with initial draft revision", "parameters": [ { "description": "指标定义与首个草稿 | Metric definition and initial draft", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CreateMetricRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricDefinitionAggregate" } }, "400": { "description": "编码或请求参数无效,编码错误返回 error_code=invalid_standard_code | Invalid code or request; code errors return error_code=invalid_standard_code", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.create" ] } }, "/metrics/standard_references": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Domain References" ], "summary": "查询业务域标准引用(metric) | List domain standard references (metric)", "parameters": [ { "type": "string", "description": "精确业务域 ID | Exact domain ID", "name": "domain_id", "in": "query", "required": true }, { "type": "integer", "default": 1, "description": "页码 | Page", "name": "page", "in": "query" }, { "type": "integer", "default": 20, "description": "每页条数,上限100 | Page size, max 100", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domainreference.Page" } }, "400": { "description": "查询无效 | Invalid query", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "未认证 | Unauthorized", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权查看 | Forbidden", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "读取失败 | Read failed", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.read" ] } }, "/metrics/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "latest_revision 是最高修订号的完整历史展示投影,current_revision 只表示指定时点生效的已发布修订。 | latest_revision contains the complete highest-numbered revision for historical display; current_revision contains only the published revision effective at the requested time.", "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取指标定义聚合 | Get metric definition aggregate", "parameters": [ { "type": "string", "description": "生效时点 | Effective point in time", "name": "as_of", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricDefinitionAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.read" ] }, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "更新指标定义归属信息 | Update metric definition ownership", "parameters": [ { "description": "归属信息及并发版本 | Ownership and concurrency version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UpdateMetricRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricDefinitionAggregate" } }, "409": { "description": "版本冲突 | Version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.update" ] }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "删除指标定义稳定身份 | Delete metric definition identity", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "仍被引用 | Still referenced", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.delete" ] } }, "/metrics/{id}/documents": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "查询指标关联的文档 | List documents by metric", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentAggregate" } } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.read", "standard.document.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "description": "首次创建说明由服务端按请求语言生成,请求不包含 change_summary。 | Initial creation summary is generated by the server in the request language; change_summary is not accepted.", "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "创建文档并关联到指标 | Create and link document to metric", "parameters": [ { "description": "文档信息及当前指标版本 | Document with current metric version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CreateLinkedDocumentRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentAggregate" } }, "400": { "description": "编码、标识或请求参数无效,编码错误返回 error_code=invalid_standard_code | Invalid code, identifier, or request; code errors return error_code=invalid_standard_code", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.update", "standard.document.create" ] } }, "/metrics/{id}/documents/link": { "post": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "关联已有文档到指标 | Link document to metric", "parameters": [ { "description": "文档 ID 及当前指标版本 | Document ID with current metric version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.LinkDocumentRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.update", "standard.document.update" ] } }, "/metrics/{id}/documents/{doc_id}": { "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "解除文档与指标的关联 | Unlink document from metric", "parameters": [ { "description": "当前指标版本 | Current metric version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.VersionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.update", "standard.document.update" ] } }, "/metrics/{id}/relations": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Professional Relations" ], "summary": "查询指标定义专业关系图 | Get metric definition professional relation graph", "parameters": [ { "type": "integer", "description": "最大边数量 | Maximum edges", "name": "limit", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ProfessionalRelationsResponse" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.read" ] } }, "/metrics/{id}/revisions": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取指标定义修订历史 | List metric definition revisions", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricDefinitionRevision" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "从最近修订创建指标定义草稿 | Create metric definition draft from latest revision", "parameters": [ { "description": "并发版本与变更说明 | Version and change summary", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CreateMetricRevisionRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricDefinitionAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.update" ] } }, "/metrics/{id}/revisions/{revision_id}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取指标定义修订 | Get metric definition revision", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricDefinitionRevision" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.read" ] }, "put": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "更新指标定义草稿修订 | Update metric definition draft revision", "parameters": [ { "description": "完整草稿及并发版本 | Full draft and concurrency version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UpdateMetricRevisionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricDefinitionAggregate" } }, "409": { "description": "状态或版本冲突 | State or version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.update" ] } }, "/metrics/{id}/revisions/{revision_id}/publish": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "发布指标定义修订 | Publish metric definition revision", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricDefinitionAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.publish" ] } }, "/metrics/{id}/revisions/{revision_id}/published-reference": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "解析已发布指标定义修订 | Resolve published metric definition revision", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.PublishedMetricDefinitionReference" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.read" ] } }, "/metrics/{id}/revisions/{revision_id}/return": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "退回指标定义修订 | Return metric definition revision", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricDefinitionAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.publish" ] } }, "/metrics/{id}/revisions/{revision_id}/submit": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "提交指标定义修订审核 | Submit metric definition revision for review", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricDefinitionAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.update" ] } }, "/metrics/{id}/revisions/{revision_id}/withdraw": { "post": { "security": [ { "BearerAuth": [] } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "撤回指标定义发布修订 | Withdraw published metric definition revision", "parameters": [ { "description": "当前资源版本 | Current resource version", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RevisionActionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricDefinitionAggregate" } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.metric.publish" ] } }, "/references/candidates": { "get": { "security": [ { "BearerAuth": [] } ], "description": "仅 addp-catalog Tenant Service Principal 可按名称或编码分页查询当前可引用的 Domain、Glossary 或 Element;只返回最小显示摘要,业务域包含 domain_path 并支持路径搜索 | Only the addp-catalog tenant service principal may search currently referenceable domains, glossaries, or elements by name or code; only minimal display summaries are returned, including domain_path and path search for domains", "produces": [ "application/json" ], "tags": [ "CatalogReferences" ], "summary": "查询 Catalog 的 Standard 引用候选 | List Standard reference candidates for Catalog", "parameters": [ { "enum": [ "domain", "glossary", "element" ], "type": "string", "description": "引用类型 | Reference type", "name": "object_type", "in": "query", "required": true }, { "type": "string", "description": "名称或编码,最多 100 字符 | Name or code, maximum 100 characters", "name": "search", "in": "query" }, { "type": "integer", "description": "页码,默认 1 | Page number, default 1", "name": "page", "in": "query" }, { "type": "integer", "description": "每页数量,默认 20,最大 50 | Page size, default 20 and maximum 50", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_service.ReferenceCandidateList" } }, "400": { "description": "请求无效 | Invalid request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "需要认证 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "仅允许 addp-catalog 且需三个读取权限 | addp-catalog and all three read permissions required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "查询失败 | Query failed", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.domain.read", "standard.glossary.read", "standard.element.read" ] } }, "/references/resolve": { "post": { "security": [ { "BearerAuth": [] } ], "description": "仅 addp-catalog 与 addp-model Tenant Service Principal 可按当前 Tenant 通过 ID 或稳定编码精确解析 Domain、Glossary 和 Element;每项必须且只能提供 id 或 code,跨 Tenant 与不存在统一返回 found=false;Glossary 仅允许 addp-catalog 解析 | Only addp-catalog and addp-model tenant service principals may resolve domains, glossaries, and elements in the current tenant by exact ID or stable code; each item must provide exactly one of id or code, cross-tenant and missing references both return found=false, and only addp-catalog may resolve glossaries", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "CatalogReferences" ], "summary": "精确批量解析 Standard 引用 | Resolve exact Standard references in batch", "parameters": [ { "description": "精确引用集合,最多 200 个 | Exact references, up to 200", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/internal_api.referenceResolutionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/internal_api.referenceResolutionResponse" } }, "400": { "description": "请求无效 | Invalid request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "需要认证 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "仅允许指定运行时客户端且需对应读取权限 | Allowed runtime client and corresponding read permissions required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "解析失败 | Resolution failed", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-conditional-permissions": [ "standard.glossary.read" ], "x-addp-required-permissions": [ "standard.domain.read", "standard.element.read" ] } }, "/runtime/catalog-references/resolve": { "post": { "security": [ { "BearerAuth": [] } ], "description": "按请求顺序动态解析 1 到 200 个五类标准引用;跨 Tenant 与不存在统一 found=false,仅供 Catalog 服务消费 | Dynamically resolve 1 to 200 standard references in request order; cross-tenant and missing references both return found=false; Catalog service only", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Catalog Integration" ], "summary": "解析 Standard 五类标准 目录引用 | Resolve Standard standard catalog references", "parameters": [ { "description": "标准目录引用 | Standard catalog references", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ResolveCatalogReferencesRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ResolveCatalogReferencesResponse" } }, "400": { "description": "请求无效 | Invalid request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "需要认证 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "非 Catalog 服务或权限不足 | Catalog service or permission required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "解析失败 | Resolution failed", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.catalog.read" ] } }, "/runtime/element-revisions/resolve": { "post": { "security": [ { "BearerAuth": [] } ], "description": "仅 addp-catalog 与 addp-model Tenant Service Principal 可按统一 as_of 解析精确数据元修订及其码值集快照;跨 Tenant、不存在或该时点无生效修订统一 found=false | Only addp-catalog and addp-model tenant service principals may resolve exact data element revisions and code-set snapshots at one shared as_of; cross-tenant, missing, or non-effective elements return found=false", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "StandardRuntime" ], "summary": "按时点批量解析数据元修订 | Resolve data element revisions at one point in time", "parameters": [ { "description": "数据元 ID 与统一查询时点,最多 200 个 | Element IDs and one shared query time, up to 200", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/internal_api.elementRevisionResolutionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/internal_api.elementRevisionResolutionResponse" } }, "400": { "description": "请求无效 | Invalid request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "需要认证 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "仅允许 addp-catalog 或 addp-model 且需数据元读取权限 | addp-catalog or addp-model and element read permission required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "解析失败 | Resolution failed", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.read" ] } }, "/runtime/element-revisions/resolve-exact": { "post": { "security": [ { "BearerAuth": [] } ], "description": "仅 addp-catalog Tenant Service Principal 可读取已发布或已撤回的历史发布修订;不按当前生效时间重新选版,跨 Tenant、未发布或不存在统一 found=false | Only the addp-catalog tenant service principal may read published or withdrawn historical revisions; it never reselects by current effective time, and cross-tenant, unpublished or missing revisions return found=false", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "StandardRuntime" ], "summary": "精确批量读取数据元修订 | Read exact data element revisions in a batch", "parameters": [ { "description": "确定修订 ID,最多 200 个 | Exact revision IDs, up to 200", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/internal_api.exactElementRevisionResolutionRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/internal_api.exactElementRevisionResolutionResponse" } }, "400": { "description": "请求无效 | Invalid request", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "需要认证 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "仅允许 addp-catalog 且需数据元读取权限 | addp-catalog and element read permission required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "500": { "description": "解析失败 | Resolution failed", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.element.read" ] } }, "/units": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取计量单位列表 | List units", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.Unit" } } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.unit.read" ] }, "post": { "security": [ { "BearerAuth": [] } ], "description": "平台用户提交稳定编码与多语种译名;租户只创建自定义单位。| Platform users submit a stable code and runtime translations; tenant users create tenant-owned units.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "创建计量单位 | Create unit", "parameters": [ { "description": "计量单位 | Measurement unit", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CreateUnitRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.Unit" } }, "400": { "description": "编码或译名无效 | Invalid code or translations", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "平台编码重复 | Duplicate platform code", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.unit.create" ] } }, "/units/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "获取计量单位详情 | Get unit detail", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.Unit" } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.unit.read" ] }, "put": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "更新计量单位 | Update unit", "parameters": [ { "description": "更新计量单位 | Update unit", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UpdateUnitRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_addp_standard_internal_models.Unit" } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "资源版本冲突 | Resource version conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.unit.update" ] }, "delete": { "security": [ { "BearerAuth": [] } ], "produces": [ "application/json" ], "tags": [ "Standard" ], "summary": "删除计量单位 | Delete unit", "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": true } }, "401": { "description": "需要登录 | Authentication required", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "403": { "description": "无权访问 | Access denied", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "409": { "description": "Conflict", "schema": { "type": "object", "additionalProperties": { "type": "string" } } } }, "x-addp-auth-mode": "permission", "x-addp-required-permissions": [ "standard.unit.delete" ] } } }, "definitions": { "cleanup.Result": { "type": "object", "properties": { "action": { "type": "string" }, "attempt": { "type": "integer" }, "cleanup_mode": { "type": "string" }, "execution_id": { "type": "string" }, "module": { "type": "string" }, "reason": { "type": "string" }, "request_id": { "type": "string" }, "schema": { "type": "string" }, "statistics": { "type": "object", "additionalProperties": { "type": "integer", "format": "int64" } }, "status": { "type": "string" }, "summary": { "$ref": "#/definitions/events.CleanupResultSummary" } } }, "domainreference.Evidence": { "type": "object", "properties": { "owner_module": { "type": "string" }, "position": { "type": "string" }, "relation_kind": { "type": "string" }, "resource_id": { "type": "string" }, "resource_name": { "type": "string" }, "resource_revision_id": { "type": "string" }, "resource_type": { "type": "string" }, "revision_id": { "type": "string" }, "state": { "type": "string" } } }, "domainreference.Page": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/domainreference.Reference" } }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "total": { "type": "integer" }, "total_pages": { "type": "integer" } } }, "domainreference.Reference": { "type": "object", "properties": { "evidence": { "type": "array", "items": { "$ref": "#/definitions/domainreference.Evidence" } }, "evidence_truncated": { "type": "boolean" }, "source_identity": { "type": "string" }, "source_type": { "type": "string" } } }, "events.CleanupResultSummary": { "type": "object", "properties": { "affected_records": { "type": "integer" }, "deleted_physical_artifacts": { "type": "integer" }, "deleted_task_definitions": { "type": "integer" }, "disabled_task_definitions": { "type": "integer" }, "error_count": { "type": "integer" }, "freed_bytes": { "type": "integer" }, "marked_missing_source": { "type": "integer" }, "marked_outdated": { "type": "integer" }, "risk_level": { "type": "string" }, "scanned_items": { "type": "integer" }, "skipped_items": { "type": "integer" } } }, "execution.ReadGrant": { "type": "object", "properties": { "own_ad_hoc": { "type": "boolean" }, "task_history": { "type": "boolean" }, "task_type": { "type": "string" } } }, "execution.ReadScope": { "type": "object", "properties": { "grants": { "type": "array", "items": { "$ref": "#/definitions/execution.ReadGrant" } }, "module": { "type": "string" }, "principal_id": { "type": "integer" }, "tenant_id": { "type": "integer" } } }, "github_com_addp_standard_internal_models.CatalogReference": { "type": "object", "required": [ "source_identity", "source_type" ], "properties": { "source_identity": { "type": "string" }, "source_type": { "type": "string" } } }, "github_com_addp_standard_internal_models.CatalogReferenceResolution": { "type": "object", "properties": { "detail_path": { "type": "string" }, "found": { "type": "boolean" }, "source_identity": { "type": "string" }, "source_type": { "type": "string" }, "status": { "type": "string" }, "summary": { "type": "object", "additionalProperties": {} }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.CatalogResourceChange": { "type": "object", "properties": { "change_id": { "type": "string" }, "observed_at": { "type": "string" }, "operation": { "type": "string" }, "snapshot": { "type": "object", "additionalProperties": {} }, "source_identity": { "type": "string" }, "source_type": { "type": "string" }, "source_version": { "type": "string" } } }, "github_com_addp_standard_internal_models.CatalogResourceChangesResponse": { "type": "object", "properties": { "changes": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CatalogResourceChange" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": "string" }, "schema_version": { "type": "string" } } }, "github_com_addp_standard_internal_models.CodeItemMutationResponse": { "type": "object", "properties": { "item": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeSetRevisionItem" }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.CodeSetAggregate": { "type": "object", "properties": { "code": { "type": "string" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "current_revision": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeSetRevision" }, "draft_revision": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeSetRevision" }, "draft_revision_id": { "type": "integer" }, "id": { "type": "integer" }, "latest_revision": { "description": "最高修订号,不表示当前生效 | Highest revision number, not necessarily effective", "allOf": [ { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeSetRevision" } ] }, "lifecycle_state": { "type": "string" }, "origin": { "type": "string" }, "owner_domain_id": { "type": "integer" }, "scope_type": { "type": "string", "enum": [ "platform", "tenant_common", "domain" ] }, "tags": { "type": "array", "items": { "type": "string" } }, "tenant_id": { "type": "integer" }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.CodeSetRevision": { "type": "object", "properties": { "change_summary": { "type": "string" }, "code_set_id": { "type": "integer" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "description": { "type": "string" }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "id": { "type": "integer" }, "items": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeSetRevisionItem" } }, "name": { "type": "string" }, "published_at": { "type": "string" }, "published_by": { "type": "integer" }, "revision_no": { "type": "integer" }, "status": { "type": "string" }, "submitted_at": { "type": "string" }, "submitted_by": { "type": "integer" }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" }, "value_type": { "type": "string" } } }, "github_com_addp_standard_internal_models.CodeSetRevisionItem": { "type": "object", "properties": { "code": { "type": "string" }, "code_set_revision_id": { "type": "integer" }, "created_at": { "type": "string" }, "definition": { "type": "string" }, "id": { "type": "integer" }, "label": { "type": "string" }, "replacement_item_id": { "type": "integer" }, "sort_order": { "type": "integer" }, "status": { "type": "string" }, "updated_at": { "type": "string" } } }, "github_com_addp_standard_internal_models.CreateCodeItemRequest": { "type": "object", "required": [ "code", "label", "status", "version" ], "properties": { "code": { "type": "string" }, "definition": { "type": "string" }, "label": { "type": "string" }, "sort_order": { "type": "integer" }, "status": { "type": "string" }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.CreateCodeSetRequest": { "type": "object", "required": [ "code", "description", "name", "scope_type", "value_type" ], "properties": { "code": { "type": "string" }, "description": { "type": "string" }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "name": { "type": "string" }, "owner_domain_id": { "type": "integer" }, "scope_type": { "type": "string", "enum": [ "tenant_common", "domain" ] }, "tags": { "type": "array", "items": { "type": "string" } }, "value_type": { "type": "string" } } }, "github_com_addp_standard_internal_models.CreateCodeSetRevisionRequest": { "type": "object", "required": [ "change_summary", "version" ], "properties": { "change_summary": { "type": "string" }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.CreateDocumentExtractionRequest": { "type": "object", "required": [ "version" ], "properties": { "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.CreateDocumentRequest": { "type": "object", "required": [ "code", "doc_type", "name", "scope_type" ], "properties": { "code": { "type": "string" }, "description": { "type": "string" }, "doc_type": { "type": "string", "enum": [ "national", "industry", "internal", "reference" ] }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "name": { "type": "string" }, "owner_domain_id": { "type": "integer" }, "publish_date": { "type": "string" }, "scope_type": { "type": "string", "enum": [ "tenant_common", "domain" ] }, "source_org": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "version_label": { "type": "string" } } }, "github_com_addp_standard_internal_models.CreateDocumentRevisionRequest": { "type": "object", "required": [ "change_summary", "version" ], "properties": { "change_summary": { "type": "string" }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.CreateElementRequest": { "type": "object", "required": [ "code", "data_type", "definition", "name", "scope_type", "value_domain_kind" ], "properties": { "code": { "type": "string" }, "code_set_revision_id": { "type": "integer" }, "data_type": { "type": "string", "enum": [ "string", "int", "bigint", "float", "decimal", "date", "datetime", "bool", "json" ] }, "default_value": { "type": "string" }, "definition": { "type": "string" }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "example_values": { "type": "array", "items": { "type": "string" } }, "format": { "type": "string" }, "length": { "type": "integer" }, "name": { "type": "string" }, "nullable": { "type": "boolean" }, "owner_domain_id": { "type": "integer" }, "precision_num": { "type": "integer" }, "range_constraint": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RangeConstraint" }, "scale": { "type": "integer" }, "scope_type": { "type": "string", "enum": [ "tenant_common", "domain" ] }, "tags": { "type": "array", "items": { "type": "string" } }, "unit_id": { "type": "integer" }, "value_domain_kind": { "type": "string" } } }, "github_com_addp_standard_internal_models.CreateElementRevisionRequest": { "type": "object", "required": [ "change_summary", "version" ], "properties": { "change_summary": { "type": "string" }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.CreateGlossaryRequest": { "type": "object", "required": [ "code", "definition", "name", "scope_type" ], "properties": { "alias": { "type": "array", "items": { "type": "string" } }, "code": { "type": "string" }, "definition": { "type": "string" }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "example": { "type": "string" }, "name": { "type": "string" }, "note": { "type": "string" }, "owner_domain_id": { "type": "integer" }, "related_ids": { "type": "array", "items": { "type": "integer" } }, "scope_type": { "type": "string", "enum": [ "tenant_common", "domain" ] }, "tags": { "type": "array", "items": { "type": "string" } } } }, "github_com_addp_standard_internal_models.CreateGlossaryRevisionRequest": { "type": "object", "required": [ "change_summary", "version" ], "properties": { "change_summary": { "type": "string" }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.CreateLinkedDocumentRequest": { "type": "object", "required": [ "code", "doc_type", "name", "scope_type", "version" ], "properties": { "code": { "type": "string" }, "description": { "type": "string" }, "doc_type": { "type": "string", "enum": [ "national", "industry", "internal", "reference" ] }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "name": { "type": "string" }, "owner_domain_id": { "type": "integer" }, "publish_date": { "type": "string" }, "scope_type": { "type": "string", "enum": [ "tenant_common", "domain" ] }, "source_org": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "version": { "type": "integer" }, "version_label": { "type": "string" } } }, "github_com_addp_standard_internal_models.CreateMeasurementCategoryRequest": { "type": "object", "required": [ "code" ], "properties": { "code": { "type": "string" }, "description": { "type": "string" }, "name": { "type": "string" }, "sort_order": { "type": "integer" }, "translations": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UnitTranslations" } } }, "github_com_addp_standard_internal_models.CreateMetricCategoryRequest": { "type": "object", "required": [ "code", "name" ], "properties": { "code": { "type": "string" }, "description": { "type": "string" }, "name": { "type": "string" }, "parent_id": { "type": "integer" }, "sort_order": { "type": "integer" } } }, "github_com_addp_standard_internal_models.CreateMetricRequest": { "type": "object", "required": [ "code", "definition", "metric_type", "name", "scope_type", "statistical_caliber" ], "properties": { "category_id": { "type": "integer" }, "code": { "type": "string" }, "definition": { "type": "string" }, "dependencies": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricDefinitionDependencyInput" } }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "metric_type": { "type": "string", "enum": [ "atomic", "derived", "composite" ] }, "name": { "type": "string" }, "owner_domain_id": { "type": "integer" }, "scope_type": { "type": "string", "enum": [ "tenant_common", "domain" ] }, "semantic_formula": { "type": "string" }, "statistical_caliber": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "unit_id": { "type": "integer" } } }, "github_com_addp_standard_internal_models.CreateMetricRevisionRequest": { "type": "object", "required": [ "change_summary", "version" ], "properties": { "change_summary": { "type": "string" }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.CreateUnitRequest": { "type": "object", "required": [ "category_id" ], "properties": { "category_id": { "type": "integer" }, "code": { "type": "string" }, "description": { "type": "string" }, "name": { "type": "string" }, "sort_order": { "type": "integer" }, "symbol": { "type": "string" }, "translations": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UnitTranslations" } } }, "github_com_addp_standard_internal_models.DecideDocumentCandidateFamilyRequest": { "type": "object", "required": [ "reason", "snapshot_token", "winner_candidate_id" ], "properties": { "reason": { "type": "string", "maxLength": 1000 }, "snapshot_token": { "type": "string", "maxLength": 64, "minLength": 64 }, "winner_candidate_id": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.DocumentAggregate": { "type": "object", "properties": { "code": { "type": "string" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "current_revision": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentRevision" }, "doc_type": { "type": "string", "enum": [ "national", "industry", "internal", "reference" ] }, "draft_revision": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentRevision" }, "draft_revision_id": { "type": "integer" }, "has_publication_history": { "type": "boolean" }, "id": { "type": "integer" }, "latest_revision": { "description": "最高修订号,不表示当前生效 | Highest revision number, not necessarily effective", "allOf": [ { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentRevision" } ] }, "lifecycle_state": { "type": "string" }, "owner_domain_id": { "type": "integer" }, "scope_type": { "type": "string", "enum": [ "platform", "tenant_common", "domain" ] }, "source_org": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "tenant_id": { "type": "integer" }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.DocumentCandidateFamilyDecision": { "type": "object", "properties": { "candidate_type": { "type": "string", "enum": [ "glossary", "element", "code_set", "metric" ] }, "code": { "type": "string" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "document_id": { "type": "integer" }, "id": { "type": "integer" }, "members": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentCandidateFamilyDecisionMemberSnapshot" } }, "reason": { "type": "string" }, "winner_candidate_id": { "type": "integer" } } }, "github_com_addp_standard_internal_models.DocumentCandidateFamilyDecisionMemberSnapshot": { "type": "object", "properties": { "candidate_id": { "type": "integer" }, "name": { "type": "string" }, "semantic_fingerprint": { "type": "string" }, "status": { "type": "string", "enum": [ "retained", "rejected" ] }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.DocumentCandidateFamilyDecisionResponse": { "type": "object", "properties": { "candidates": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtractionCandidate" } }, "decision": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentCandidateFamilyDecision" } } }, "github_com_addp_standard_internal_models.DocumentCandidateFormalization": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "created_identity", "created_revision", "linked_existing" ] }, "candidate_id": { "type": "integer" }, "change_summary": { "type": "string" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "revision_id": { "type": "integer" }, "revision_no": { "type": "integer" }, "standard_code": { "type": "string" }, "standard_id": { "type": "integer" }, "target_revision_status": { "type": "string", "enum": [ "draft", "in_review", "published", "withdrawn" ] } } }, "github_com_addp_standard_internal_models.DocumentCandidateFormalizationResponse": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "created_identity", "created_revision", "linked_existing" ] }, "candidate_id": { "type": "integer" }, "candidate_type": { "type": "string", "enum": [ "glossary", "element", "code_set", "metric" ] }, "candidate_version": { "type": "integer" }, "change_summary": { "type": "string" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "revision_id": { "type": "integer" }, "revision_no": { "type": "integer" }, "standard_code": { "type": "string" }, "standard_id": { "type": "integer" }, "target_revision_status": { "type": "string", "enum": [ "draft", "in_review", "published", "withdrawn" ] } } }, "github_com_addp_standard_internal_models.DocumentExtraction": { "type": "object", "properties": { "candidates": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtractionCandidate" } }, "created_at": { "type": "string" }, "document_revision_id": { "type": "integer" }, "id": { "type": "integer" }, "requested_by": { "type": "integer" }, "status": { "type": "string", "enum": [ "completed" ] }, "tenant_id": { "type": "integer" } } }, "github_com_addp_standard_internal_models.DocumentExtractionCandidate": { "type": "object", "properties": { "candidate_type": { "type": "string", "enum": [ "glossary", "element", "code_set", "metric" ] }, "code": { "type": "string" }, "comparison": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtractionCandidateComparison" }, "created_at": { "type": "string" }, "definition": { "type": "string" }, "evidences": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtractionEvidence" } }, "extraction_id": { "type": "integer" }, "formalization": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentCandidateFormalization" }, "id": { "type": "integer" }, "name": { "type": "string" }, "payload": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtractionCandidatePayload" }, "reviewed_at": { "type": "string" }, "reviewed_by": { "type": "integer" }, "status": { "type": "string", "enum": [ "pending", "retained", "rejected" ] }, "updated_at": { "type": "string" }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.DocumentExtractionCandidateComparison": { "type": "object", "properties": { "code": { "type": "string" }, "differences": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtractionCandidateDifference" } }, "name": { "type": "string" }, "owner_domain_id": { "type": "integer" }, "result": { "type": "string", "enum": [ "new", "exact", "content_conflict", "scope_conflict" ] }, "revision_id": { "type": "integer" }, "revision_no": { "type": "integer" }, "revision_status": { "type": "string", "enum": [ "draft", "in_review", "published", "withdrawn" ] }, "scope_type": { "type": "string", "enum": [ "platform", "tenant_common", "domain" ] }, "standard_id": { "type": "integer" } } }, "github_com_addp_standard_internal_models.DocumentExtractionCandidateComparisonItem": { "type": "object", "properties": { "code": { "type": "string" }, "definition": { "type": "string" }, "name": { "type": "string" } } }, "github_com_addp_standard_internal_models.DocumentExtractionCandidateComparisonValue": { "type": "object", "properties": { "integer": { "type": "integer" }, "items": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtractionCandidateComparisonItem" } }, "kind": { "type": "string", "enum": [ "empty", "text", "integer", "code_items" ] }, "text": { "type": "string" } } }, "github_com_addp_standard_internal_models.DocumentExtractionCandidateDifference": { "type": "object", "properties": { "candidate_value": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtractionCandidateComparisonValue" }, "field": { "type": "string", "enum": [ "scope_type", "owner_domain_id", "name", "definition", "data_type", "value_domain_kind", "code_set_code", "unit", "value_type", "items", "statistical_caliber", "semantic_formula" ] }, "standard_value": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtractionCandidateComparisonValue" } } }, "github_com_addp_standard_internal_models.DocumentExtractionCandidateFamily": { "type": "object", "properties": { "candidate_type": { "type": "string", "enum": [ "glossary", "element", "code_set", "metric" ] }, "code": { "type": "string" }, "decision_count": { "type": "integer" }, "family_key": { "type": "string" }, "first_seen_at": { "type": "string" }, "last_seen_at": { "type": "string" }, "occurrence_count": { "type": "integer" }, "representative_name": { "type": "string" }, "snapshot_token": { "type": "string" }, "total_variant_count": { "type": "integer" }, "variant_count": { "type": "integer" }, "variants": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtractionCandidateGroup" } } } }, "github_com_addp_standard_internal_models.DocumentExtractionCandidateFamilyComparisonCounts": { "type": "object", "properties": { "all": { "type": "integer" }, "content_conflict": { "type": "integer" }, "exact": { "type": "integer" }, "new": { "type": "integer" }, "scope_conflict": { "type": "integer" } } }, "github_com_addp_standard_internal_models.DocumentExtractionCandidateGroup": { "type": "object", "properties": { "candidate": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtractionCandidate" }, "first_seen_at": { "type": "string" }, "last_seen_at": { "type": "string" }, "occurrence_count": { "type": "integer" }, "occurrences": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtractionCandidateOccurrence" } }, "semantic_fingerprint": { "type": "string" }, "state": { "type": "string", "enum": [ "pending", "retained", "rejected", "formalized" ] } } }, "github_com_addp_standard_internal_models.DocumentExtractionCandidateOccurrence": { "type": "object", "properties": { "candidate_id": { "type": "integer" }, "document_revision_id": { "type": "integer" }, "evidences": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtractionEvidence" } }, "extracted_at": { "type": "string" }, "extraction_id": { "type": "integer" }, "formalization": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentCandidateFormalization" }, "requested_by": { "type": "integer" }, "reviewed_at": { "type": "string" }, "reviewed_by": { "type": "integer" }, "status": { "type": "string", "enum": [ "pending", "retained", "rejected" ] }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.DocumentExtractionCandidatePayload": { "type": "object", "properties": { "aggregation": { "type": "string" }, "calculation_formula": { "type": "string" }, "code_set_code": { "type": "string" }, "data_type": { "type": "string", "enum": [ "string", "int", "bigint", "float", "decimal", "date", "datetime", "bool", "json" ] }, "dimensions": { "type": "array", "items": { "type": "string" } }, "items": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtractionCandidatePayloadItem" } }, "statistical_scope": { "type": "string" }, "unit": { "type": "string" }, "value_domain_kind": { "type": "string", "enum": [ "unrestricted", "range", "enumeration" ] } } }, "github_com_addp_standard_internal_models.DocumentExtractionCandidatePayloadItem": { "type": "object", "properties": { "code": { "type": "string" }, "definition": { "type": "string" }, "name": { "type": "string" } } }, "github_com_addp_standard_internal_models.DocumentExtractionCandidateVariantStatusCounts": { "type": "object", "properties": { "formalized": { "type": "integer" }, "pending": { "type": "integer" }, "rejected": { "type": "integer" }, "retained": { "type": "integer" } } }, "github_com_addp_standard_internal_models.DocumentExtractionEvidence": { "type": "object", "properties": { "candidate_id": { "type": "integer" }, "created_at": { "type": "string" }, "document_revision_id": { "type": "integer" }, "end_line": { "type": "integer" }, "excerpt": { "type": "string" }, "excerpt_hash": { "type": "string" }, "id": { "type": "integer" }, "section_path": { "type": "string" }, "start_line": { "type": "integer" } } }, "github_com_addp_standard_internal_models.DocumentRevision": { "type": "object", "properties": { "change_summary": { "type": "string" }, "content_sha256": { "type": "string" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "description": { "type": "string" }, "document_id": { "type": "integer" }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "file_key": { "type": "string" }, "file_name": { "type": "string" }, "file_size": { "type": "integer" }, "id": { "type": "integer" }, "media_type": { "type": "string" }, "name": { "type": "string" }, "publish_date": { "type": "string" }, "published_at": { "type": "string" }, "published_by": { "type": "integer" }, "revision_no": { "type": "integer" }, "status": { "type": "string", "enum": [ "draft", "in_review", "published", "withdrawn" ] }, "submitted_at": { "type": "string" }, "submitted_by": { "type": "integer" }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" }, "version_label": { "type": "string" } } }, "github_com_addp_standard_internal_models.Domain": { "type": "object", "properties": { "code": { "type": "string" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "description": { "type": "string" }, "icon": { "type": "string" }, "id": { "type": "integer" }, "lifecycle_state": { "type": "string" }, "name": { "type": "string" }, "parent_id": { "type": "integer" }, "sort_order": { "type": "integer" }, "tenant_id": { "type": "integer" }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.ElementAggregate": { "type": "object", "properties": { "code": { "type": "string" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "current_revision": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ElementRevision" }, "draft_revision": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ElementRevision" }, "draft_revision_id": { "type": "integer" }, "id": { "type": "integer" }, "latest_revision": { "description": "最高修订号,不表示当前生效 | Highest revision number, not necessarily effective", "allOf": [ { "$ref": "#/definitions/github_com_addp_standard_internal_models.ElementRevision" } ] }, "lifecycle_state": { "type": "string" }, "owner_domain_id": { "type": "integer" }, "scope_type": { "type": "string", "enum": [ "platform", "tenant_common", "domain" ] }, "tags": { "type": "array", "items": { "type": "string" } }, "tenant_id": { "type": "integer" }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.ElementRevision": { "type": "object", "properties": { "change_summary": { "type": "string" }, "code_set_revision_id": { "type": "integer" }, "compiled_quality_rules": { "$ref": "#/definitions/github_com_addp_standard_internal_models.JSONB" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "data_type": { "type": "string" }, "default_value": { "type": "string" }, "definition": { "type": "string" }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "element_id": { "type": "integer" }, "example_values": { "type": "array", "items": { "type": "string" } }, "format": { "type": "string" }, "id": { "type": "integer" }, "length": { "type": "integer" }, "name": { "type": "string" }, "nullable": { "type": "boolean" }, "precision_num": { "type": "integer" }, "published_at": { "type": "string" }, "published_by": { "type": "integer" }, "range_constraint": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RangeConstraint" }, "revision_no": { "type": "integer" }, "scale": { "type": "integer" }, "status": { "type": "string" }, "submitted_at": { "type": "string" }, "submitted_by": { "type": "integer" }, "unit_id": { "type": "integer" }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" }, "value_domain_kind": { "type": "string" } } }, "github_com_addp_standard_internal_models.FormalizeDocumentExtractionCandidateRequest": { "type": "object", "required": [ "change_summary", "version" ], "properties": { "change_summary": { "type": "string" }, "metric_type": { "type": "string", "enum": [ "atomic", "derived", "composite" ] }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.GlossaryAggregate": { "type": "object", "properties": { "code": { "type": "string" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "current_revision": { "$ref": "#/definitions/github_com_addp_standard_internal_models.GlossaryRevision" }, "draft_revision": { "$ref": "#/definitions/github_com_addp_standard_internal_models.GlossaryRevision" }, "draft_revision_id": { "type": "integer" }, "has_publication_history": { "type": "boolean" }, "id": { "type": "integer" }, "latest_revision": { "description": "最高修订号,不表示当前生效 | Highest revision number, not necessarily effective", "allOf": [ { "$ref": "#/definitions/github_com_addp_standard_internal_models.GlossaryRevision" } ] }, "lifecycle_state": { "type": "string" }, "owner_domain_id": { "type": "integer" }, "scope_type": { "type": "string", "enum": [ "platform", "tenant_common", "domain" ] }, "tags": { "type": "array", "items": { "type": "string" } }, "tenant_id": { "type": "integer" }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.GlossaryElementReference": { "type": "object", "properties": { "code": { "type": "string" }, "id": { "type": "integer" }, "is_effective": { "type": "boolean" }, "lifecycle_state": { "type": "string" }, "name": { "type": "string" }, "revision_id": { "type": "integer" }, "revision_no": { "type": "integer" }, "status": { "type": "string", "enum": [ "draft", "in_review", "published", "withdrawn" ] } } }, "github_com_addp_standard_internal_models.GlossaryRevision": { "type": "object", "properties": { "alias": { "type": "array", "items": { "type": "string" } }, "change_summary": { "type": "string" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "definition": { "type": "string" }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "example": { "type": "string" }, "glossary_id": { "type": "integer" }, "id": { "type": "integer" }, "name": { "type": "string" }, "note": { "type": "string" }, "published_at": { "type": "string" }, "published_by": { "type": "integer" }, "related_ids": { "type": "array", "items": { "type": "integer" } }, "revision_no": { "type": "integer" }, "status": { "type": "string", "enum": [ "draft", "in_review", "published", "withdrawn" ] }, "submitted_at": { "type": "string" }, "submitted_by": { "type": "integer" }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" } } }, "github_com_addp_standard_internal_models.JSONB": { "type": "object", "additionalProperties": true }, "github_com_addp_standard_internal_models.LinkDocumentRequest": { "type": "object", "required": [ "doc_id", "version" ], "properties": { "doc_id": { "type": "integer" }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.MeasurementCategory": { "type": "object", "properties": { "code": { "type": "string" }, "created_at": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "scope_type": { "type": "string", "enum": [ "platform", "tenant_common" ] }, "sort_order": { "type": "integer" }, "tenant_id": { "type": "integer" }, "translations": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UnitTranslations" }, "updated_at": { "type": "string" }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.MetricCategory": { "type": "object", "properties": { "code": { "type": "string" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "description": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "parent_id": { "type": "integer" }, "sort_order": { "type": "integer" }, "tenant_id": { "type": "integer" }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.MetricDefinitionAggregate": { "type": "object", "properties": { "category_id": { "type": "integer" }, "code": { "type": "string" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "current_revision": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricDefinitionRevision" }, "draft_revision": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricDefinitionRevision" }, "draft_revision_id": { "type": "integer" }, "id": { "type": "integer" }, "latest_revision": { "description": "最高修订号,不表示当前生效 | Highest revision number, not necessarily effective", "allOf": [ { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricDefinitionRevision" } ] }, "lifecycle_state": { "type": "string" }, "owner_domain_id": { "type": "integer" }, "scope_type": { "type": "string", "enum": [ "platform", "tenant_common", "domain" ] }, "tags": { "type": "array", "items": { "type": "string" } }, "tenant_id": { "type": "integer" }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.MetricDefinitionDependencyInput": { "type": "object", "required": [ "metric_definition_id", "relation_kind" ], "properties": { "coefficient": { "type": "number" }, "metric_definition_id": { "type": "integer" }, "note": { "type": "string" }, "relation_kind": { "type": "string", "enum": [ "base", "component" ] } } }, "github_com_addp_standard_internal_models.MetricDefinitionRevision": { "type": "object", "properties": { "change_summary": { "type": "string" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "definition": { "type": "string" }, "dependencies": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricDefinitionRevisionDependency" } }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "id": { "type": "integer" }, "metric_definition_id": { "type": "integer" }, "metric_type": { "type": "string", "enum": [ "atomic", "derived", "composite" ] }, "name": { "type": "string" }, "published_at": { "type": "string" }, "published_by": { "type": "integer" }, "revision_no": { "type": "integer" }, "semantic_formula": { "type": "string" }, "statistical_caliber": { "type": "string" }, "status": { "type": "string" }, "submitted_at": { "type": "string" }, "submitted_by": { "type": "integer" }, "unit_id": { "type": "integer" }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" } } }, "github_com_addp_standard_internal_models.MetricDefinitionRevisionDependency": { "type": "object", "properties": { "coefficient": { "type": "number" }, "created_at": { "type": "string" }, "dependency_definition_id": { "type": "integer" }, "dependency_revision_id": { "type": "integer" }, "id": { "type": "integer" }, "metric_definition_revision_id": { "type": "integer" }, "note": { "type": "string" }, "relation_kind": { "type": "string", "enum": [ "base", "component" ] } } }, "github_com_addp_standard_internal_models.PaginatedCodeSetResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CodeSetAggregate" } }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "total": { "type": "integer" }, "total_pages": { "type": "integer" } } }, "github_com_addp_standard_internal_models.PaginatedDocumentCandidateFamilyDecisionResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentCandidateFamilyDecision" } }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "total": { "type": "integer" }, "total_pages": { "type": "integer" } } }, "github_com_addp_standard_internal_models.PaginatedDocumentExtractionCandidateFamilyResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtractionCandidateFamily" } }, "family_comparison_counts": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtractionCandidateFamilyComparisonCounts" }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "total": { "type": "integer" }, "total_pages": { "type": "integer" }, "variant_status_counts": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentExtractionCandidateVariantStatusCounts" }, "variant_total": { "type": "integer" } } }, "github_com_addp_standard_internal_models.PaginatedDocumentResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.DocumentAggregate" } }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "total": { "type": "integer" }, "total_pages": { "type": "integer" } } }, "github_com_addp_standard_internal_models.PaginatedElementResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ElementAggregate" } }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "total": { "type": "integer" }, "total_pages": { "type": "integer" } } }, "github_com_addp_standard_internal_models.PaginatedGlossaryResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.GlossaryAggregate" } }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "total": { "type": "integer" }, "total_pages": { "type": "integer" } } }, "github_com_addp_standard_internal_models.PaginatedMetricResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricDefinitionAggregate" } }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "total": { "type": "integer" }, "total_pages": { "type": "integer" } } }, "github_com_addp_standard_internal_models.ProfessionalRelationEdge": { "type": "object", "properties": { "coefficient": { "type": "number" }, "id": { "type": "string" }, "note": { "type": "string" }, "relation_kind": { "type": "string" }, "source": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ProfessionalResourceKey" }, "target": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ProfessionalResourceKey" } } }, "github_com_addp_standard_internal_models.ProfessionalRelationNode": { "type": "object", "properties": { "code": { "type": "string" }, "kind": { "type": "string" }, "name": { "type": "string" }, "owner_module": { "type": "string" }, "resource_id": { "type": "string" }, "resource_type": { "type": "string" }, "status": { "type": "string" } } }, "github_com_addp_standard_internal_models.ProfessionalRelationsResponse": { "type": "object", "properties": { "edges": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ProfessionalRelationEdge" } }, "nodes": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ProfessionalRelationNode" } }, "schema_version": { "type": "string" }, "subject": { "$ref": "#/definitions/github_com_addp_standard_internal_models.ProfessionalResourceKey" }, "truncated": { "type": "boolean" } } }, "github_com_addp_standard_internal_models.ProfessionalResourceKey": { "type": "object", "properties": { "owner_module": { "type": "string" }, "resource_id": { "type": "string" }, "resource_type": { "type": "string" } } }, "github_com_addp_standard_internal_models.PublishedElementQualityRulesResponse": { "type": "object", "properties": { "element_id": { "type": "integer" }, "element_revision_id": { "type": "integer" }, "quality_rules": { "$ref": "#/definitions/github_com_addp_standard_internal_models.JSONB" }, "revision_no": { "type": "integer" } } }, "github_com_addp_standard_internal_models.PublishedMetricDefinitionReference": { "type": "object", "properties": { "code": { "type": "string" }, "id": { "type": "integer" }, "lifecycle_state": { "type": "string" }, "metric_type": { "type": "string" }, "name": { "type": "string" }, "owner_domain_id": { "type": "integer" }, "revision_id": { "type": "integer" }, "revision_no": { "type": "integer" }, "scope_type": { "type": "string" }, "status": { "type": "string" }, "tenant_id": { "type": "integer" }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.RangeConstraint": { "type": "object", "properties": { "max": { "type": "string" }, "max_inclusive": { "type": "boolean" }, "min": { "type": "string" }, "min_inclusive": { "type": "boolean" } } }, "github_com_addp_standard_internal_models.ResolveCatalogReferencesRequest": { "type": "object", "required": [ "references" ], "properties": { "references": { "type": "array", "maxItems": 200, "minItems": 1, "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CatalogReference" } } } }, "github_com_addp_standard_internal_models.ResolveCatalogReferencesResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.CatalogReferenceResolution" } } } }, "github_com_addp_standard_internal_models.ResourceVersionResponse": { "type": "object", "properties": { "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.RevisionActionRequest": { "type": "object", "required": [ "version" ], "properties": { "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.SetDocumentMappingsRequest": { "type": "object", "required": [ "version" ], "properties": { "element_ids": { "type": "array", "items": { "type": "integer" } }, "glossary_ids": { "type": "array", "items": { "type": "integer" } }, "locations": { "type": "object", "additionalProperties": { "type": "string" } }, "metric_ids": { "type": "array", "items": { "type": "integer" } }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.Unit": { "type": "object", "properties": { "category": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MeasurementCategory" }, "category_id": { "type": "integer" }, "code": { "type": "string" }, "created_at": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "scope_type": { "type": "string", "enum": [ "platform", "tenant_common" ] }, "sort_order": { "type": "integer" }, "symbol": { "type": "string" }, "tenant_id": { "type": "integer" }, "translations": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UnitTranslations" }, "updated_at": { "type": "string" }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.UnitTranslation": { "type": "object", "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "symbol": { "type": "string" } } }, "github_com_addp_standard_internal_models.UnitTranslations": { "type": "object", "additionalProperties": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UnitTranslation" } }, "github_com_addp_standard_internal_models.UpdateCodeItemRequest": { "type": "object", "required": [ "label", "status", "version" ], "properties": { "definition": { "type": "string" }, "label": { "type": "string" }, "replacement_item_id": { "type": "integer" }, "sort_order": { "type": "integer" }, "status": { "type": "string" }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.UpdateCodeSetRequest": { "type": "object", "required": [ "scope_type", "version" ], "properties": { "owner_domain_id": { "type": "integer" }, "scope_type": { "type": "string", "enum": [ "tenant_common", "domain" ] }, "tags": { "type": "array", "items": { "type": "string" } }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.UpdateCodeSetRevisionRequest": { "type": "object", "required": [ "change_summary", "description", "name", "value_type", "version" ], "properties": { "change_summary": { "type": "string" }, "description": { "type": "string" }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "name": { "type": "string" }, "value_type": { "type": "string" }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.UpdateDocumentExtractionCandidateRequest": { "type": "object", "required": [ "status", "version" ], "properties": { "status": { "type": "string", "enum": [ "retained", "rejected" ] }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.UpdateDocumentRequest": { "type": "object", "required": [ "doc_type", "scope_type", "version" ], "properties": { "doc_type": { "type": "string", "enum": [ "national", "industry", "internal", "reference" ] }, "owner_domain_id": { "type": "integer" }, "scope_type": { "type": "string", "enum": [ "tenant_common", "domain" ] }, "source_org": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.UpdateDocumentRevisionRequest": { "type": "object", "required": [ "change_summary", "name", "version" ], "properties": { "change_summary": { "type": "string" }, "description": { "type": "string" }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "name": { "type": "string" }, "publish_date": { "type": "string" }, "version": { "type": "integer", "minimum": 1 }, "version_label": { "type": "string" } } }, "github_com_addp_standard_internal_models.UpdateDomainRequest": { "type": "object", "required": [ "version" ], "properties": { "description": { "type": "string" }, "icon": { "type": "string" }, "name": { "type": "string" }, "parent_id": { "type": "integer" }, "sort_order": { "type": "integer" }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.UpdateElementRequest": { "type": "object", "required": [ "scope_type", "version" ], "properties": { "owner_domain_id": { "type": "integer" }, "scope_type": { "type": "string", "enum": [ "tenant_common", "domain" ] }, "tags": { "type": "array", "items": { "type": "string" } }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.UpdateElementRevisionRequest": { "type": "object", "required": [ "change_summary", "data_type", "definition", "name", "value_domain_kind", "version" ], "properties": { "change_summary": { "type": "string" }, "code_set_revision_id": { "type": "integer" }, "data_type": { "type": "string", "enum": [ "string", "int", "bigint", "float", "decimal", "date", "datetime", "bool", "json" ] }, "default_value": { "type": "string" }, "definition": { "type": "string" }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "example_values": { "type": "array", "items": { "type": "string" } }, "format": { "type": "string" }, "length": { "type": "integer" }, "name": { "type": "string" }, "nullable": { "type": "boolean" }, "precision_num": { "type": "integer" }, "range_constraint": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RangeConstraint" }, "scale": { "type": "integer" }, "unit_id": { "type": "integer" }, "value_domain_kind": { "type": "string" }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.UpdateGlossaryElementsRequest": { "type": "object", "required": [ "version" ], "properties": { "element_ids": { "type": "array", "items": { "type": "integer" } }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.UpdateGlossaryRequest": { "type": "object", "required": [ "scope_type", "version" ], "properties": { "owner_domain_id": { "type": "integer" }, "scope_type": { "type": "string", "enum": [ "tenant_common", "domain" ] }, "tags": { "type": "array", "items": { "type": "string" } }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.UpdateGlossaryRevisionRequest": { "type": "object", "required": [ "change_summary", "definition", "name", "version" ], "properties": { "alias": { "type": "array", "items": { "type": "string" } }, "change_summary": { "type": "string" }, "definition": { "type": "string" }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "example": { "type": "string" }, "name": { "type": "string" }, "note": { "type": "string" }, "related_ids": { "type": "array", "items": { "type": "integer" } }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.UpdateMeasurementCategoryRequest": { "type": "object", "required": [ "version" ], "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "sort_order": { "type": "integer" }, "translations": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UnitTranslations" }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.UpdateMetricCategoryRequest": { "type": "object", "required": [ "name", "version" ], "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "parent_id": { "type": "integer" }, "sort_order": { "type": "integer" }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.UpdateMetricRequest": { "type": "object", "required": [ "scope_type", "version" ], "properties": { "category_id": { "type": "integer" }, "owner_domain_id": { "type": "integer" }, "scope_type": { "type": "string", "enum": [ "tenant_common", "domain" ] }, "tags": { "type": "array", "items": { "type": "string" } }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.UpdateMetricRevisionRequest": { "type": "object", "required": [ "change_summary", "definition", "metric_type", "name", "statistical_caliber", "version" ], "properties": { "change_summary": { "type": "string" }, "definition": { "type": "string" }, "dependencies": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_models.MetricDefinitionDependencyInput" } }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "metric_type": { "type": "string", "enum": [ "atomic", "derived", "composite" ] }, "name": { "type": "string" }, "semantic_formula": { "type": "string" }, "statistical_caliber": { "type": "string" }, "unit_id": { "type": "integer" }, "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_models.UpdateUnitRequest": { "type": "object", "required": [ "version" ], "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "sort_order": { "type": "integer" }, "symbol": { "type": "string" }, "translations": { "$ref": "#/definitions/github_com_addp_standard_internal_models.UnitTranslations" }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_models.VersionRequest": { "type": "object", "required": [ "version" ], "properties": { "version": { "type": "integer", "minimum": 1 } } }, "github_com_addp_standard_internal_service.CodeItemSnapshot": { "type": "object", "properties": { "code": { "type": "string" }, "definition": { "type": "string" }, "label": { "type": "string" }, "replacement_item_id": { "type": "string", "example": "" }, "sort_order": { "type": "integer" }, "status": { "type": "string", "enum": [ "active", "deprecated" ] } } }, "github_com_addp_standard_internal_service.CodeSetRevisionSnapshot": { "type": "object", "properties": { "code": { "type": "string" }, "code_set_id": { "type": "string", "example": "" }, "description": { "type": "string" }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "items": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_service.CodeItemSnapshot" } }, "name": { "type": "string" }, "origin": { "type": "string", "enum": [ "platform", "tenant" ] }, "owner_domain_id": { "type": "string", "example": "" }, "revision_id": { "type": "string", "example": "" }, "revision_no": { "type": "integer" }, "scope_type": { "type": "string", "enum": [ "platform", "tenant_common", "domain" ] }, "status": { "type": "string", "enum": [ "draft", "in_review", "published", "withdrawn" ] }, "value_type": { "type": "string" } } }, "github_com_addp_standard_internal_service.DomainTree": { "type": "object", "properties": { "children": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_service.DomainTree" } }, "code": { "type": "string" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "description": { "type": "string" }, "icon": { "type": "string" }, "id": { "type": "integer" }, "lifecycle_state": { "type": "string" }, "name": { "type": "string" }, "parent_id": { "type": "integer" }, "sort_order": { "type": "integer" }, "tenant_id": { "type": "integer" }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_service.ElementRevisionDetail": { "type": "object", "properties": { "change_summary": { "type": "string" }, "code_set_revision": { "$ref": "#/definitions/github_com_addp_standard_internal_service.CodeSetRevisionSnapshot" }, "code_set_revision_id": { "type": "integer" }, "compiled_quality_rules": { "$ref": "#/definitions/github_com_addp_standard_internal_models.JSONB" }, "created_at": { "type": "string" }, "created_by": { "type": "integer" }, "data_type": { "type": "string" }, "default_value": { "type": "string" }, "definition": { "type": "string" }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "element_code": { "type": "string" }, "element_id": { "type": "integer" }, "example_values": { "type": "array", "items": { "type": "string" } }, "format": { "type": "string" }, "id": { "type": "integer" }, "length": { "type": "integer" }, "name": { "type": "string" }, "nullable": { "type": "boolean" }, "precision_num": { "type": "integer" }, "published_at": { "type": "string" }, "published_by": { "type": "integer" }, "range_constraint": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RangeConstraint" }, "revision_no": { "type": "integer" }, "scale": { "type": "integer" }, "status": { "type": "string" }, "submitted_at": { "type": "string" }, "submitted_by": { "type": "integer" }, "unit_id": { "type": "integer" }, "updated_at": { "type": "string" }, "updated_by": { "type": "integer" }, "value_domain_kind": { "type": "string" } } }, "github_com_addp_standard_internal_service.ElementRevisionResolution": { "type": "object", "properties": { "element_id": { "type": "string", "example": "" }, "found": { "type": "boolean" }, "snapshot": { "$ref": "#/definitions/github_com_addp_standard_internal_service.ElementRevisionSnapshot" } } }, "github_com_addp_standard_internal_service.ElementRevisionSnapshot": { "type": "object", "properties": { "code": { "type": "string" }, "code_set_revision": { "$ref": "#/definitions/github_com_addp_standard_internal_service.CodeSetRevisionSnapshot" }, "data_type": { "type": "string" }, "default_value": { "type": "string" }, "definition": { "type": "string" }, "effective_from": { "type": "string" }, "effective_to": { "type": "string" }, "element_id": { "type": "string", "example": "" }, "element_revision_id": { "type": "string", "example": "" }, "example_values": { "type": "array", "items": { "type": "string" } }, "format": { "type": "string" }, "length": { "type": "integer" }, "name": { "type": "string" }, "nullable": { "type": "boolean" }, "owner_domain_id": { "type": "string", "example": "" }, "precision_num": { "type": "integer" }, "range_constraint": { "$ref": "#/definitions/github_com_addp_standard_internal_models.RangeConstraint" }, "revision_no": { "type": "integer" }, "scale": { "type": "integer" }, "scope_type": { "type": "string", "enum": [ "platform", "tenant_common", "domain" ] }, "status": { "type": "string", "enum": [ "published", "withdrawn" ] }, "unit_id": { "type": "string", "example": "" }, "value_domain_kind": { "type": "string", "enum": [ "unrestricted", "range", "enumeration" ] } } }, "github_com_addp_standard_internal_service.ExactElementRevisionResolution": { "type": "object", "properties": { "found": { "type": "boolean" }, "revision_id": { "type": "string", "example": "" }, "snapshot": { "$ref": "#/definitions/github_com_addp_standard_internal_service.ElementRevisionSnapshot" } } }, "github_com_addp_standard_internal_service.ReferenceCandidate": { "type": "object", "properties": { "code": { "type": "string" }, "domain_path": { "description": "业务域完整名称路径 / Full domain name path.", "type": "array", "items": { "type": "string" } }, "id": { "type": "integer" }, "name": { "type": "string" }, "object_type": { "$ref": "#/definitions/github_com_addp_standard_internal_service.ReferenceType" }, "revision_id": { "type": "integer" }, "revision_no": { "type": "integer" }, "status": { "type": "string" } } }, "github_com_addp_standard_internal_service.ReferenceCandidateList": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_service.ReferenceCandidate" } }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "total": { "type": "integer" }, "total_pages": { "type": "integer" } } }, "github_com_addp_standard_internal_service.ReferenceResolution": { "type": "object", "properties": { "code": { "type": "string" }, "domain_path": { "description": "业务域完整名称路径 / Full domain name path.", "type": "array", "items": { "type": "string" } }, "found": { "type": "boolean" }, "id": { "type": "integer" }, "lifecycle_state": { "type": "string" }, "name": { "type": "string" }, "object_type": { "$ref": "#/definitions/github_com_addp_standard_internal_service.ReferenceType" }, "referenceable": { "type": "boolean" }, "revision_id": { "type": "integer" }, "revision_no": { "type": "integer" }, "status": { "type": "string" }, "version": { "type": "integer" } } }, "github_com_addp_standard_internal_service.ReferenceResolutionRequest": { "type": "object", "required": [ "object_type" ], "properties": { "code": { "type": "string" }, "id": { "type": "integer", "minimum": 1 }, "object_type": { "enum": [ "domain", "glossary", "element" ], "allOf": [ { "$ref": "#/definitions/github_com_addp_standard_internal_service.ReferenceType" } ] } } }, "github_com_addp_standard_internal_service.ReferenceType": { "type": "string", "enum": [ "domain", "glossary", "element" ], "x-enum-varnames": [ "ReferenceTypeDomain", "ReferenceTypeGlossary", "ReferenceTypeElement" ] }, "internal_api.elementRevisionResolutionRequest": { "type": "object", "required": [ "as_of", "element_ids" ], "properties": { "as_of": { "type": "string", "format": "date-time" }, "element_ids": { "type": "array", "maxItems": 200, "minItems": 1, "uniqueItems": true, "items": { "type": "string" } } } }, "internal_api.elementRevisionResolutionResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_service.ElementRevisionResolution" } } } }, "internal_api.exactElementRevisionResolutionRequest": { "type": "object", "required": [ "revision_ids" ], "properties": { "revision_ids": { "type": "array", "maxItems": 200, "minItems": 1, "uniqueItems": true, "items": { "type": "string" } } } }, "internal_api.exactElementRevisionResolutionResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_service.ExactElementRevisionResolution" } } } }, "internal_api.referenceResolutionRequest": { "type": "object", "required": [ "references" ], "properties": { "references": { "type": "array", "maxItems": 200, "minItems": 1, "items": { "$ref": "#/definitions/github_com_addp_standard_internal_service.ReferenceResolutionRequest" } } } }, "internal_api.referenceResolutionResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/definitions/github_com_addp_standard_internal_service.ReferenceResolution" } } } } }, "securityDefinitions": { "BearerAuth": { "type": "apiKey", "name": "Authorization", "in": "header" } } }