API网关 APIG-x-apigateway-backend.mockEndpoints

时间:2023-11-01 16:25:08

x-apigateway-backend.mockEndpoints

含义:API网关定义的MOCK类型API后端服务定义。

作用域x-apigateway-backend

示例

paths:  '/users/{userId}':    get:      produces:        - "application/json"      parameters:        - name: "X-Auth-Token"          description: "认证token"          type: "string"          in: "header"          required: true      responses:        default:          description: "default response"      x-apigateway-request-type: "public"      x-apigateway-backend:        type: "MOCK"        mockEndpoints:          result-content: "mocked"
表1 参数说明

参数

是否必选

类型

说明

result-content

String

MOCK返回结果

support.huaweicloud.com/devg-apig/apig_04_0011.html