Skip to content

ServicesSync

OpenAPI Document Synchronization Configuration - Synchronize service implementations with Swagger/OpenAPI documentation


Query the service synchronization configuration

GET
/api/v1/services/{serviceId}/synchronization

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Replace synchronization configuration of the service

PUT
/api/v1/services/{serviceId}/synchronization

Replace synchronization configuration of the services, allow up to 10 configuration to be added

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

请求体

application/json
JSON
{
"name": "AAS Door Apis",
"apiDocsUrl": "http://192.168.0.101:1807/v2/api-docs?group=Api",
"strategyWhenDuplicated": "COVER",
"deleteWhenNotExisted": false,
"auths": [
{
"in": "header",
"keyName": "Authorization",
"value": "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
}
]
}

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量
主体

示例

cURL
JavaScript
PHP
Python

Delete the service synchronization configuration

DELETE
/api/v1/services/{serviceId}/synchronization

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

查询参数

names*

Synchronization configuration names

类型array
必填
uniqueItemstrue

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Replace all synchronization configuration of the service

PUT
/api/v1/services/{serviceId}/synchronization/all

Replace all synchronization configuration of the services, allow up to 10 configuration to be added

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

请求体

application/json
JSON
[
{
"name": "AAS Door Apis",
"apiDocsUrl": "http://192.168.0.101:1807/v2/api-docs?group=Api",
"strategyWhenDuplicated": "COVER",
"deleteWhenNotExisted": false,
"auths": [
{
"in": "header",
"keyName": "Authorization",
"value": "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
}
]
}
]

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量
主体

示例

cURL
JavaScript
PHP
Python

Execute the service synchronization

POST
/api/v1/services/{serviceId}/synchronization/exec

Execute the synchronization of service by OpenAPI docs configuration

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

查询参数

name

Synchronization configuration name, synchronize all OpenAPI docs under the project when the value is empty

类型string

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Test the synchronization configuration

POST
/api/v1/services/synchronization/test

Test whether the synchronization url and authorization information are configured correctly

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

请求体

application/json
JSON
{
"apiDocsUrl": "http://192.168.0.101:1807/v2/api-docs?group=Api",
"auths": [
{
"in": "header",
"keyName": "Authorization",
"value": "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
}
]
}

响应

OK

*/*
JSON
{
"code": "string",
"msg": "string",
"data": {
},
"datetime": "string",
"ext": {
"additionalProperties": {
}
}
}

试验场

授权
主体

示例

cURL
JavaScript
PHP
Python

Released under the GPL-3.0 License.