feat: 补充 nacos 2.x open api —— 命名空间部分接口#294
Open
lly835 wants to merge 1 commit intonacos-group:masterfrom
Open
feat: 补充 nacos 2.x open api —— 命名空间部分接口#294lly835 wants to merge 1 commit intonacos-group:masterfrom
lly835 wants to merge 1 commit intonacos-group:masterfrom
Conversation
- 使用独立的 NamespaceFormParam 替代复用 v1 的 NamespaceParam,字段更规范(namespaceId/namespaceName/namespaceDesc) - 查询命名空间详情(GET)增加 namespaceId 必填校验,错误码对齐 nacos 2.x 规范(22000/22001) - 创建命名空间(POST)增加 namespaceName 必填校验、namespaceId 格式校验和长度限制(128) - 编辑命名空间(PUT)增加 namespaceId 必填校验和 namespaceName 非法字符校验 - 删除命名空间(DELETE)增加 namespaceId 必填校验 - 所有接口统一使用 nacos 2.x 错误码(10000/22000/22001/30000) Closes nacos-group#149 (命名空间部分)
|
|
Collaborator
|
只加了接口,没有配置对应的路由 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue
Closes #149 (命名空间部分)
变更内容
补充
/nacos/v2/console/namespace下的命名空间接口,使其对齐 nacos 2.x open api 规范。主要改动
新增独立的请求参数结构体
NamespaceFormParam:替代复用 v1 的NamespaceParam,字段更规范(namespaceId/namespaceName/namespaceDesc),与 nacos 2.x 的NamespaceForm对齐。查询命名空间详情(GET):增加
namespaceId必填校验,命名空间不存在时返回错误码 22001。创建命名空间(POST):
namespaceName必填校验namespaceId格式校验(仅允许[\w-]+)namespaceId长度限制(最大 128 字符)namespaceName非法字符校验(不允许@#$%^&*)编辑命名空间(PUT):增加
namespaceId必填校验和namespaceName非法字符校验。删除命名空间(DELETE):增加
namespaceId必填校验。错误码对齐 nacos 2.x 规范:
10000:参数缺失22000:命名空间不合法22001:命名空间不存在30000:服务端内部错误涉及文件
src/openapi/v2/console/namespace.rs