API网关 APIG-导入MOCK类型后端服务API

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

导入MOCK类型后端服务API

包含无认证的GET方法API定义,后端服务类型为MOCK。

Swagger示例:

swagger: "2.0"info:  title: "importMockEndpoint"  description: "import apis"  version: "1.0"host: "api.account.com"paths:  '/mock':    get:      operationId: "mock"      description: "mock test"      schemes:      - http      responses:        "200":          description: "mock result"      x-apigateway-request-type: "private"      x-apigateway-cors: true      x-apigateway-match-mode: "NORMAL"      x-apigateway-backend:        type: "MOCK"        mockEndpoints:          result-content: "{\"message\": \"mocked\"}"securityDefinitions:  apig-auth-app:    in: header    name: Authorization    type: apiKey    x-apigateway-auth-type: AppSigv1  apig-auth-iam:    in: header    name: unused    type: apiKey    x-apigateway-auth-type:  IAM 
support.huaweicloud.com/devg-apig/apig_04_0021.html