Skip to content

ServicesComponent

Service OpenAPI Component Management - Centralized management of OpenAPI components (schemas, responses, security schemes) across services


Replace the service OpenAPI components

PUT
/api/v1/services/{serviceId}/comp/{type}/{key}

Replace the OpenAPI component of service. For more details on the Components Object, please see: OpenAPI Specification#Components Object

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"
type*

Component type

类型string
必填
枚举
"schemas""responses""parameters""examples""requestBodies""headers""securitySchemes""links""callbacks""extensions""pathItems"
key*

Component key

类型string
必填

请求体

application/json
JSON
"string"

响应

OK

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

试验场

授权
变量
主体

示例

cURL
JavaScript
PHP
Python

Query the service OpenAPI components by reference

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

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

查询参数

refs*

Component references

类型array
必填
uniqueItemstrue
ignoreModel

Ignore query model, default false

类型boolean

响应

OK

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

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Delete the service OpenAPI components by reference

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

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

查询参数

refs*

Component references

类型array
必填
uniqueItemstrue

响应

OK

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

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Query the service OpenAPI components of the specified type

GET
/api/v1/services/{serviceId}/comp/type

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

查询参数

types*

Component types

类型array
必填
uniqueItemstrue
keys

Component keys

类型array
uniqueItemstrue
ignoreModel

Ignore query model, default false

类型boolean

响应

OK

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

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Query the service OpenAPI component by reference

GET
/api/v1/services/{serviceId}/comp/ref

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

查询参数

ref*

Component reference

类型string
必填

响应

OK

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

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Query the service OpenAPI components by reference

GET
/api/v1/services/{serviceId}/comp/all

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"

查询参数

ignoreModel

Ignore query model, default false

类型boolean

响应

OK

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

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Delete all OpenAPI components of the service

DELETE
/api/v1/services/{serviceId}/comp/all

授权

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

Delete the service OpenAPI components by type

DELETE
/api/v1/services/{serviceId}/comp/{type}

Delete the OpenAPI components by type of service. If the component keys parameter is empty, all components under the type will be deleted

授权

UserHttpBearer

Use existing opaque tokens for authentication

类型HTTP (bearer)

参数

路径参数

serviceId*

Service id

类型integer
必填
format"int64"
type*

Component type

类型string
必填
枚举
"schemas""responses""parameters""examples""requestBodies""headers""securitySchemes""links""callbacks""extensions""pathItems"

查询参数

keys

Component keys

类型array
uniqueItemstrue

响应

OK

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

试验场

授权
变量

示例

cURL
JavaScript
PHP
Python

Released under the GPL-3.0 License.