Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 增加查询文件源与凭证详情的ApiGW接口 #2830 #2870

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

liuliaozhong
Copy link
Collaborator

No description provided.

@liuliaozhong liuliaozhong requested a review from jsonwan April 2, 2024 10:20
| ---------------- | ------ | ------------------------------------------------------------ |
| bk_scope_type | string | 资源范围类型。可选值: biz - 业务,biz_set - 业务集 |
| bk_scope_id | string | 资源范围ID, 与bk_scope_type对应, 表示业务ID或者业务集ID |
| id | string | 凭据ID |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

统一使用“凭证”,与页面保持一致,其他地方也检查下,有“凭据”的地方都改过来。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已改

| bk_scope_type | string | 是 | 资源范围类型。可选值: biz - 业务,biz_set - 业务集 |
| bk_scope_id | string | 是 | 资源范围ID, 与bk_scope_type对应, 表示业务ID或者业务集ID |
| bk_biz_id | long | 是 | *已弃用*。业务ID。此字段已被弃用并由字段bk_scope_type+bk_scope_id替换 |
| id | String | 是 | 凭据ID |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

统一使用“凭证”,与页面保持一致,其他地方也检查下,有“凭据”的地方都改过来。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已改


- GET
```json
/api/v3/get_file_source_detail?bk_scope_type=biz&bk_scope_id=1&code=1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code=1不太合适,看着像数字,可改为bkrepo-1

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已改

"data": {
"bk_scope_type": "biz",
"bk_scope_id": "2",
"id": 0,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id改为大于0的数字

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已改

"code": "xxx",
"alias": "xxx",
"status": 0,
"file_source_type": 3,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个字段建议改为文件源类型的code

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已改

| code | string | 文件源code |
| alias | string | 文件源别名 |
| status | int | 状态 |
| file_source_type | int | 类型。可选值:蓝鲸制品库 |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个字段建议改为文件源类型的code,类型与描述需要相应修改

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已改

| credential_id | string | 凭据ID |
| enable | bool | 是否启用 |
| creator | string | 作业创建人账号 |
| create_time | long | 创建时间,Unix 时间戳 |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要注明单位为ms

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已改

| creator | string | 作业创建人账号 |
| create_time | long | 创建时间,Unix 时间戳 |
| last_modify_user | string | 作业修改人账号 |
| last_modify_time | long | 最后修改时间,Unix 时间戳 |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要注明单位为ms

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已改

@@ -0,0 +1,79 @@
### Function Description
Copy link
Collaborator

@jsonwan jsonwan Apr 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESB文档可去除,只提供ApiGW的接口

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已去除

@@ -291,6 +291,17 @@
dest_http_method: POST
is_hidden: True

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESB相关改动可去除,只提供ApiGW的接口

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已去除

String username,
String appCode,
@AuditRequestBody EsbGetFileSourceDetailV3Req req) {
FileSourceDTO fileSourceDTO = fileSourceService.getFileSourceByCode(req.getCode());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要加上appId查询,code仅在appId下唯一,仅使用code获取的地方需要改过来

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

Copy link
Collaborator

@jsonwan jsonwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

几个小问题需要处理下

@@ -39,8 +39,9 @@
public interface ServiceFileSourceResource {

@ApiOperation(value = "获取文件源ID", produces = "application/json")
@GetMapping("/service/fileSource/getFileSourceIdByCode/codes/{code}")
@GetMapping("/service/app/{appId}/fileSource/getFileSourceIdByCode/codes/{code}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不要直接改接口路径,避免发布时任务异常。
添加一个新的接口,并将老接口标记为Deprecated,在下个大版本再删除,以实现无损发布。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

Copy link
Collaborator

@jsonwan jsonwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1个问题需要处理。

@jsonwan jsonwan merged commit 2783365 into TencentBlueKing:master Apr 9, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants