{"openapi":"3.1.0","info":{"title":"zeroweb-service-dev","version":"v1"},"servers":[{"url":"http://localhost:10991","description":"Generated server url"}],"tags":[{"name":"translation-http-endpoint","description":"国际化文本管理"},{"name":"language-http-endpoint","description":"语言管理"},{"name":"i-18n-message-http-endpoint","description":"国际化内容及文本管理"},{"name":"metadata-http-endpoint","description":"服务自省"}],"paths":{"/locale":{"put":{"tags":["translation-http-endpoint"],"summary":"新增或更新国际化文本。","description":"新增或更新国际化文本。","operationId":"upsertTranslation","requestBody":{"description":"国际化文本请求体。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertTranslationReq"}}},"required":true},"responses":{"200":{"description":"新增或更新的国际化文本 ID。","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Id"}}}}}}},"/language":{"get":{"tags":["language-http-endpoint"],"summary":"查询语言列表。","description":"查询语言列表。","operationId":"queryLanguageList","responses":{"200":{"description":"语言列表。","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Language"}}}}}}},"put":{"tags":["language-http-endpoint"],"summary":"更新语言。","description":"更新语言。","operationId":"updateLanguage","requestBody":{"description":"语言请求体。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModifyLanguageReq"}}},"required":true},"responses":{"200":{"description":"OK"}}},"post":{"tags":["language-http-endpoint"],"summary":"新增语言。","description":"新增语言。","operationId":"addLanguage","requestBody":{"description":"语言请求体。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddLanguageReq"}}},"required":true},"responses":{"200":{"description":"新增语言的 ID。","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Id"}}}}}}},"/i18n":{"get":{"tags":["i-18n-message-http-endpoint"],"summary":"列举国际化内容命名空间。","description":"列举国际化内容命名空间。","operationId":"listI18nNamespace","responses":{"200":{"description":"国际化内容命名空间列表。","content":{"*/*":{"schema":{"type":"array","items":{"type":"string"}}}}}}},"put":{"tags":["i-18n-message-http-endpoint"],"summary":"更新国际化内容。","description":"更新国际化内容。","operationId":"updateI18nMessage","requestBody":{"description":"国际化内容。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateI18nMessageReq"}}},"required":true},"responses":{"200":{"description":"OK"}}},"post":{"tags":["i-18n-message-http-endpoint"],"summary":"新增国际化内容。","description":"新增国际化内容。","operationId":"addI18nMessage","requestBody":{"description":"国际化内容请求体。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddI18nMessageReq"}}},"required":true},"responses":{"200":{"description":"新增国际化内容的 ID。","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Id"}}}}}}},"/metadata/menu.json":{"get":{"tags":["metadata-http-endpoint"],"summary":"获取当前服务提供的所有菜单或资源信息。","description":"获取当前服务提供的所有菜单或资源信息。","operationId":"loadResourceInfo","responses":{"200":{"description":"包含所有 [MenuInfo] 对象的列表，聚合了所有 [IMenuService] 的结果。","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MenuInfo"}}}}}}}},"/metadata/info.json":{"get":{"tags":["metadata-http-endpoint"],"summary":"获取当前服务的自省信息。","description":"获取当前服务的自省信息。","operationId":"loadServiceInfo","responses":{"200":{"description":"包含服务名称、版本、类型等信息的 [ServiceInfo] 对象。","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ServiceInfo"}}}}}}},"/locale/{language}/{namespace}":{"get":{"tags":["translation-http-endpoint"],"summary":"加载国际化资源。","description":"加载国际化资源。","operationId":"loadTranslation","parameters":[{"name":"language","in":"path","description":"国际化语言标签。","required":true,"schema":{"type":"string","minLength":1}},{"name":"namespace","in":"path","description":"命名空间。","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"国际化内容键-国际化文本的映射。","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/i18n/{namespace}":{"get":{"tags":["i-18n-message-http-endpoint"],"summary":"分页查询国际化内容。","description":"分页查询国际化内容。","operationId":"queryI18nMessageList","parameters":[{"name":"namespace","in":"path","description":"命名空间。","required":true,"schema":{"type":"string","minLength":1}},{"name":"odata","in":"query","description":"分页查询参数。","required":true,"schema":{"$ref":"#/components/schemas/ODataRequestParam"}}],"responses":{"200":{"description":"国际化内容列表。","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelI18nMessage"}}}}}}},"/i18n/{namespace}/{messageKey}":{"get":{"tags":["i-18n-message-http-endpoint"],"summary":"查询国际化文本。","description":"查询国际化文本。","operationId":"queryTranslation","parameters":[{"name":"namespace","in":"path","description":"命名空间。","required":true,"schema":{"type":"string","minLength":1}},{"name":"messageKey","in":"path","description":"国际化内容键。","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"语言-国际化文本的映射。","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}},"/language/{id}":{"delete":{"tags":["language-http-endpoint"],"summary":"删除语言。","description":"删除语言。","operationId":"deleteLanguage","parameters":[{"name":"id","in":"path","description":"语言 ID。","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK"}}}},"/i18n/{id}":{"delete":{"tags":["i-18n-message-http-endpoint"],"summary":"删除国际化内容。","description":"删除国际化内容。","operationId":"deleteI18nMessage","parameters":[{"name":"id","in":"path","description":"国际化内容 ID。","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK"}}}}},"components":{"schemas":{"UpsertTranslationReq":{"type":"object","description":"更新或新增国际化文本的请求体","properties":{"namespace":{"type":"string","description":"命名空间 与国际化内容的命名空间一致","maxLength":255,"minLength":0},"messageKey":{"type":"string","description":"国际化内容","maxLength":255,"minLength":0},"language":{"type":"string","description":"国际化语言标签","maxLength":255,"minLength":0},"content":{"type":"string","description":"国际化文本","minLength":1}},"required":["content","language","messageKey","namespace"]},"Id":{"type":"object","description":"封装 ID 的记录类。\n将 ID 封装成强类型对象，避免原始类型偏执。","properties":{"id":{"type":"string","description":"ID 字符串"}}},"ModifyLanguageReq":{"type":"object","description":"修改语言的请求参数","properties":{"id":{"type":"string","description":"需要被修改的语言的ID"},"languageTag":{"type":"string","description":"语言标签","maxLength":255,"minLength":0},"description":{"type":"string","description":"语言描述","maxLength":255,"minLength":0},"ordinal":{"type":"integer","format":"int32","description":"排序序号"},"enabled":{"type":"boolean","description":"是否启用"}},"required":["id","languageTag","ordinal"]},"UpdateI18nMessageReq":{"type":"object","description":"修改国际化内容的请求参数。","properties":{"id":{"type":"string","description":"国际化内容 ID"},"namespace":{"type":"string","description":"国际化内容命名空间。","maxLength":255,"minLength":0},"messageKey":{"type":"string","description":"国际化内容的键。","maxLength":255,"minLength":0}},"required":["id","messageKey","namespace"]},"AddLanguageReq":{"type":"object","description":"新增语言的请求参数","properties":{"languageTag":{"type":"string","description":"语言标签","maxLength":255,"minLength":0},"description":{"type":"string","description":"语言描述","maxLength":255,"minLength":0},"ordinal":{"type":"integer","format":"int32","description":"排序"},"enabled":{"type":"boolean","description":"是否启用"}},"required":["languageTag","ordinal"]},"AddI18nMessageReq":{"type":"object","description":"新增国际化内容的请求参数。","properties":{"namespace":{"type":"string","description":"国际化内容命名空间。","maxLength":255,"minLength":0},"messageKey":{"type":"string","description":"国际化内容的键。","maxLength":255,"minLength":0}},"required":["messageKey","namespace"]},"MenuInfo":{"type":"object","description":"菜单或资源的信息封装类。\n用于描述前端菜单、外部链接、嵌入页面以及后端接口权限和资源权限等。","properties":{"type":{"type":"string","description":"菜单或资源的具体类型，例如路由、外部链接、接口权限等。","enum":["ROUTE","EXTERNAL_LINK","EMBEDDED","PERMISSION","GROUP_PERMISSION"]},"path":{"type":"string","description":"菜单或资源的路径。\n不同类型的资源有不同的路径格式，详见 [MenuType]。"},"permissions":{"type":"array","description":"访问此菜单或资源所需要的权限集合。\n取并集，即访问者必须满足列表中所有权限才能访问。","items":{"type":"string"}}}},"ServiceInfo":{"type":"object","description":"服务元数据信息封装类。\n包含服务的名称、版本、类型以及是否隐藏等信息，用于服务自省。","properties":{"name":{"type":"string","description":"服务的名称，例如 \"user-service\" 或 \"product-service\"。"},"version":{"type":"string","description":"服务的版本，例如 \"1.0.0\"。"},"type":{"type":"string","description":"服务的类型，例如 [ServiceType#CLIENT] (前端) 或 [ServiceType#SERVER] (后端)。\n默认为 [ServiceType#SERVER]。","enum":["CLIENT","SERVER"]},"hidden":{"type":"boolean","description":"指示服务是否应该在站内链接中隐藏。\n如果为 `true`，则通常不应在公共菜单或服务列表中显示。\n默认为 `true`。"}}},"Language":{"type":"object","description":"语言实体类。\n\n用于表示系统中的语言信息，底层基于字典实现。\n每个语言实体包含语言标签、描述、排序号以及启用状态等信息。","properties":{"id":{"type":"string","description":"语言的唯一标识符。"},"dictTag":{"type":"string","description":"字典标签。\n\n固定为 \"Language\"，不可为空，不可更新。"},"languageTag":{"type":"string","description":"语言标签（例如：\"zh-CN\", \"en-US\"）。\n\n用于标识具体的语言，不可为空。"},"description":{"type":"string","description":"语言的描述信息。\n\n可选，用于提供对语言更友好的说明。"},"ordinal":{"type":"integer","format":"int32","description":"语言的排序号。\n\n数值越小，在列表中显示的顺序越靠前，不可为空。"},"parentId":{"type":"string","description":"字典上级 ID。\n\n固定为 \"1\"。"},"enabled":{"type":"boolean","description":"语言的启用状态。\n\n`true` 表示启用，`false` 表示禁用，不可为空。"},"editable":{"type":"boolean","description":"语言信息是否可编辑。\n\n固定为 `true`，表示语言信息是可编辑的。"}}},"ODataRequestParam":{"type":"object","description":"OData 请求参数","properties":{"top":{"type":"integer","format":"int32","description":"最大返回条数"},"skip":{"type":"integer","format":"int32","description":"偏移量"}}},"I18nMessage":{"type":"object","description":"国际化内容实体类\n\n用于存储和管理应用程序中的国际化消息。\n每个国际化消息由一个唯一的 ID、一个命名空间和一个消息键组成。","properties":{"id":{"type":"string","description":"国际化内容的唯一标识符。\n\n作为主键，不可为空，不可更新，长度由 [`DatabaseConstant.ID_LENGTH`](zeroweb-service/zeroweb-service-dev/src/main/java/io/github/xezzon/zeroweb/common/constant/DatabaseConstant.java) 定义。"},"namespace":{"type":"string","description":"国际化内容的命名空间。\n\n用于对国际化消息进行逻辑分组，不可为空。"},"messageKey":{"type":"string","description":"国际化消息的键。\n\n在给定的命名空间内唯一标识一个国际化消息，不可为空。"}}},"PageMetadata":{"type":"object","properties":{"size":{"type":"integer","format":"int64"},"number":{"type":"integer","format":"int64"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int64"}}},"PagedModelI18nMessage":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/I18nMessage"}},"page":{"$ref":"#/components/schemas/PageMetadata"}}}}}}