微服务引擎 CSE-修改微服务契约:请求示例

时间:2023-11-01 16:20:04

请求示例

修改指定service_id和schema_id的契约的契约内容和摘要。

PUT https://{endpoint}/v4/{project_id}/registry/microservices/{service_id}/schemas/{schema_id}{  "schema": "---\nswagger: \"2.0\"\ninfo:\n  version: \"1.0.0\"\n  title: \"swagger definition for com.service.provider.controller.ProviderImpl\"\n  x-java-interface: \"cse.gen.springmvc.provider.provider.ProviderImplIntf\"\nbasePath:  \"/provider\"\nconsumes:\n- \"application/json\"\nproduces:\n- \"application/json\"\npaths:\n  /helloworld:\n    get:\n      operationId: \"helloworld\"\n      produces:\n      - \"application/json\"\n      parameters:\n      - name: \"name\"\n        in: \"query\"\n        required: true\n        type: \"string\"\n      responses:\n        200:\n          description: \"response of 200\"\n          schema:\n            type: \"string\"\n",  "summary": "test"}
support.huaweicloud.com/api-cse/servicecomb_api_0013.html