Updated on 2023-06-26 GMT+08:00

Modifying a Microservice Schema

Function

This API is used to modify a microservice schema based on the schema ID. By default, the schema of a professional microservice engine cannot be modified, but that of an exclusive microservice engine can.

URI

PUT /v4/{project_id}/registry/microservices/{serviceId}/schemas/{schemaId}

Table 1 Path parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Fixed value: default.

serviceId

String

Yes

Microservice ID, which must be unique.

The value must be 1 to 64 characters long.

Regular expression: ^.*$

schemaId

String

Yes

Microservice schema ID, which must be unique.

The value must be 1 to 160 characters long.

Regular expression: ^[a-zA-Z0-9]{1,160}$|^[a-zA-Z0-9][a-zA-Z0-9_\-.]{0,158}[a-zA-Z0-9]$

Request

Table 2 Request body parameters

Parameter

Type

Mandatory

Description

schema

String

Yes

Microservice schema content.

summary

String

No

Microservice schema summary.

Response

Response parameters

None

Example

Example request

{
  "schema": "string",
  "summary": "string"
}

Example response

None

Status Code

See Status Codes.

Error Code

See CSE Error Codes.