检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
APIG的API设计文件扩展定义 x-apigateway-auth-type x-apigateway-request-type x-apigateway-match-mode x-apigateway-cors x-apigateway-is-send-fg-body-base64
info的title作为API分组名称,新创建的API分组名称不能与已有的API分组名称重名。 导入的API定义中,如果存在冲突,那么根据系统导入的先后顺序,先导入的API会显示导入成功,后导入的API会显示导入失败。例如导入的API定义中存在2个名称相同或请求路径相同的API,
special 否 x-apigateway-ratelimits.policy.special 对象数组 特殊流控策略。 父主题: APIG的API设计文件扩展定义
x-apigateway-ratelimit: 'customRatelimitName' 表1 参数说明 参数 是否必选 类型 说明 x-apigateway-ratelimit 否 String 流控策略。 父主题: APIG的API设计文件扩展定义
100 instance: xxxxxxxxx 表1 参数说明 参数 是否必选 类型 说明 customRatelimitName 否 x-apigateway-ratelimits.policy 指定名称的流控策略。 要使用该策略,将x-apigateway-ratelimit属性值引用为该策略名称。
name: test in: query required: true 父主题: APIG的API设计文件扩展定义
含义: API的请求内容类型。 作用域: Operation Object(2.0) 示例: paths: /: get: x-apigateway-content-type: application/json 父主题: APIG的API设计文件扩展定义
BACKEND:后端 表2 Identity 参数 是否必选 类型 说明 name 是 String 参数名称。 location 是 String 参数位置。 validation 否 String 参数校验表达式,默认为null,不做校验。 父主题: APIG的API设计文件扩展定义
public:公开类型API,可以上架。 private:私有类型API,不会被上架。 父主题: APIG的API设计文件扩展定义
IAM 表1 参数说明 参数 是否必选 类型 说明 appcode-auth-type 否 String AppCode简易认证类型,默认为disable。 disable:不开启简易认证 header:开启简易认证且AppCode位置在HEADER。 父主题: APIG的API设计文件扩展定义
参数说明 参数 是否必选 类型 说明 x-apigateway-plugins 否 Array API所绑定的插件名列表。 父主题: APIG的API设计文件扩展定义
mockEndpoints 否 x-apigateway-backend.mockEndpoints MOCK类型后端服务定义。 父主题: APIG的API设计文件扩展定义
x-apigateway-orchestrations 含义: API请求参数的编排规则列表。 作用域: Operation Object(2.0)/Operation Object(3.0) 示例: paths: /: get: parameters:
Control,Range 正式请求允许的头域。 Access-Control-Allow-Methods GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH 正式请求允许的方法。 父主题: APIG的API设计文件扩展定义
x-apigateway-auth-type 含义:基于Swagger的apiKey认证格式,定义API网关支持的特有认证方式。 作用域:Security Scheme Object(2.0)/Security Scheme Object(3.0) Swagger: securityDefinitions:
x-apigateway-match-mode 含义:API网关定义的API请求URL的匹配模式,支持NORMAL和SWA。 作用域:Operation Object(2.0)/Operation Object(3.0) 示例: paths: '/path': get:
description: "any response" 表1 参数说明 参数 是否必选 类型 说明 x-apigateway-any-method 否 String API请求方法。 父主题: APIG的API设计文件扩展定义
name: test in: query required: true 父主题: APIG的API设计文件扩展定义
含义:API的网关响应名称。 作用域: Operation Object(2.0)/Operation Object(3.0) 示例: paths: /: get: x-apigateway-response: test 父主题: APIG的API设计文件扩展定义
"error_msg":"Access denied","request_id":"$context.requestId"} 父主题: APIG的API设计文件扩展定义