forked from TencentBlueKing/bk-job
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Tencent/bk-job into issue…
…_2631
- Loading branch information
Showing
9 changed files
with
383 additions
and
3 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
docs/apidoc/bk-api-gateway/v3/zh/get_latest_service_version.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
### 功能描述 | ||
|
||
查询作业平台最新服务版本号 | ||
|
||
### 请求参数 | ||
|
||
{{ bkapi_authorization_description }} | ||
|
||
#### Header参数 | ||
|
||
| 字段 | 类型 | 必选 | 描述 | | ||
|-----------|------------|--------|------------| | ||
| X-Bkapi-Authorization | string | 是 | 认证信息。详情参考[调用网关 API](https://github.com/TencentBlueKing/BKDocs/blob/master/ZH/7.0/APIGateway/apigateway/use-api/use-apigw-api.md) | | ||
| Accept | string | 是 | 固定值。application/json| | ||
| Content-Type | string | 是 | 固定值。application/json| | ||
|
||
#### Query参数 | ||
|
||
无 | ||
|
||
### 请求参数示例 | ||
|
||
- GET | ||
```json | ||
/api/v3/get_latest_service_version | ||
``` | ||
|
||
### 返回结果示例 | ||
```json | ||
{ | ||
"result": true, | ||
"code": 0, | ||
"message": "success", | ||
"data": { | ||
"version": "3.6.4" | ||
} | ||
} | ||
``` | ||
|
||
### 返回结果参数说明 | ||
|
||
| 字段 | 类型 | 描述 | | ||
|-----------|-----------|-----------| | ||
| result | bool | 请求成功与否。true:请求成功;false请求失败 | | ||
| code | int | 错误编码。 0表示success,>0表示失败错误 | | ||
| message | string | 请求失败返回的错误信息| | ||
| data | object | 请求返回的数据| | ||
| permission | object | 权限信息| | ||
|
||
##### data | ||
|
||
| 字段 | 类型 | 描述 | | ||
|-----------|-----------|-----------| | ||
| version | string |服务最新版本号| |
53 changes: 53 additions & 0 deletions
53
docs/apidoc/esb/jobv3-confapis/apidocs/en/get_latest_service_version.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
### Function Description | ||
|
||
Query the latest service version | ||
|
||
### Request Parameters | ||
|
||
{{ common_args_desc }} | ||
|
||
#### Interface parameters | ||
|
||
null | ||
|
||
### Example of request | ||
|
||
```json | ||
{ | ||
"bk_app_code": "esb_test", | ||
"bk_app_secret": "xxx", | ||
"bk_token": "xxx", | ||
"bk_username": "admin" | ||
} | ||
``` | ||
|
||
### Example of responses | ||
|
||
```json | ||
{ | ||
"result": true, | ||
"code": 0, | ||
"message": "success", | ||
"data": { | ||
"version": "3.6.4" | ||
} | ||
} | ||
``` | ||
|
||
### Response Description | ||
|
||
#### response | ||
| Fields | Type | Description | | ||
|-----------|-----------|-----------| | ||
| result | bool | Whether the request succeeded or not. True: request succeeded;False: request failed| | ||
| code | int | Error code. 0 indicates success, >0 indicates failure| | ||
| message | string |Error message| | ||
| data | object |Data returned by request| | ||
| permission | object |Permission information| | ||
| request_id | string |Request chain id| | ||
|
||
#### data | ||
|
||
| Fields | Type | Description | | ||
|-----------|-----------|-----------| | ||
| version | string |The latest version number of the service| |
53 changes: 53 additions & 0 deletions
53
docs/apidoc/esb/jobv3-confapis/apidocs/zh_hans/get_latest_service_version.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
### 功能描述 | ||
|
||
查询作业平台最新的服务版本号。 | ||
|
||
### 请求参数 | ||
|
||
{{ common_args_desc }} | ||
|
||
#### 接口参数 | ||
|
||
无 | ||
|
||
### 请求参数示例 | ||
|
||
```json | ||
{ | ||
"bk_app_code": "esb_test", | ||
"bk_app_secret": "xxx", | ||
"bk_token": "xxx", | ||
"bk_username": "admin" | ||
} | ||
``` | ||
|
||
### 返回结果示例 | ||
|
||
```json | ||
{ | ||
"result": true, | ||
"code": 0, | ||
"message": "success", | ||
"data": { | ||
"version": "3.6.4" | ||
} | ||
} | ||
``` | ||
|
||
### 返回结果参数说明 | ||
|
||
#### response | ||
|
||
| 字段 | 类型 | 描述 | | ||
| ---------- | ------ | ------------------------------------------ | | ||
| result | bool | 请求成功与否。true:请求成功;false请求失败 | | ||
| code | int | 错误编码。 0表示success,>0表示失败错误 | | ||
| message | string | 请求失败返回的错误信息 | | ||
| data | object | 请求返回的数据 | | ||
| permission | object | 权限信息 | | ||
|
||
#### data | ||
|
||
| 字段 | 类型 | 描述 | | ||
|-----------|-----------|-----------| | ||
| version | string |服务最新版本号| |
This file contains 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
This file contains 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
This file contains 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
56 changes: 56 additions & 0 deletions
56
...b-manage/src/main/java/com/tencent/bk/job/manage/api/esb/v3/EsbServiceInfoV3Resource.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Tencent is pleased to support the open source community by making BK-JOB蓝鲸智云作业平台 available. | ||
* | ||
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. | ||
* | ||
* BK-JOB蓝鲸智云作业平台 is licensed under the MIT License. | ||
* | ||
* License for BK-JOB蓝鲸智云作业平台: | ||
* -------------------------------------------------------------------- | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | ||
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation | ||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and | ||
* to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of | ||
* the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO | ||
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF | ||
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
* IN THE SOFTWARE. | ||
*/ | ||
|
||
package com.tencent.bk.job.manage.api.esb.v3; | ||
|
||
import com.tencent.bk.job.common.annotation.EsbAPI; | ||
import com.tencent.bk.job.common.constant.JobCommonHeaders; | ||
import com.tencent.bk.job.common.esb.model.EsbResp; | ||
import com.tencent.bk.job.manage.model.esb.v3.response.EsbServiceVersionV3DTO; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestHeader; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
/** | ||
* 服务信息API-V3 | ||
*/ | ||
@RequestMapping("/esb/api/v3") | ||
@RestController | ||
@EsbAPI | ||
public interface EsbServiceInfoV3Resource { | ||
|
||
@GetMapping("/get_latest_service_version") | ||
EsbResp<EsbServiceVersionV3DTO> getLatestServiceVersion( | ||
@RequestHeader(value = JobCommonHeaders.USERNAME) String username, | ||
@RequestHeader(value = JobCommonHeaders.APP_CODE) String appCode | ||
); | ||
|
||
@PostMapping("/get_latest_service_version") | ||
EsbResp<EsbServiceVersionV3DTO> getLatestServiceVersionUsingPost( | ||
@RequestHeader(value = JobCommonHeaders.USERNAME) String username, | ||
@RequestHeader(value = JobCommonHeaders.APP_CODE) String appCode | ||
); | ||
} |
39 changes: 39 additions & 0 deletions
39
...src/main/java/com/tencent/bk/job/manage/model/esb/v3/response/EsbServiceVersionV3DTO.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Tencent is pleased to support the open source community by making BK-JOB蓝鲸智云作业平台 available. | ||
* | ||
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. | ||
* | ||
* BK-JOB蓝鲸智云作业平台 is licensed under the MIT License. | ||
* | ||
* License for BK-JOB蓝鲸智云作业平台: | ||
* -------------------------------------------------------------------- | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | ||
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation | ||
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and | ||
* to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of | ||
* the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO | ||
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF | ||
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
* IN THE SOFTWARE. | ||
*/ | ||
|
||
package com.tencent.bk.job.manage.model.esb.v3.response; | ||
|
||
import com.fasterxml.jackson.annotation.JsonPropertyDescription; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
@Data | ||
@EqualsAndHashCode | ||
public class EsbServiceVersionV3DTO { | ||
/** | ||
* 服务版本号 | ||
*/ | ||
@JsonPropertyDescription("Service Version") | ||
private String version; | ||
} |
Oops, something went wrong.