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

时间:2023-12-07 11:04:49

x-apigateway-backend.parameters

含义:API网关定义的API后端参数定义。

作用域x-apigateway-backend

示例

paths:
  '/users/{userId}':
    get:
      produces:
        - "application/json"
      parameters:
        - name: "X-Auth-Token"
          description: "认证token"
          type: "string"
          in: "header"
          required: true
        - name: "userId"
          description: "用户名"
          type: "string"
          in: "path"
          required: true
      responses:
        default:
          description: "default response"
      x-apigateway-request-type: "public"
      x-apigateway-backend:
        type: "HTTP"
        parameters:
          - name: "userId"
            value: "userId"
            in: "query"
            origin: "REQUEST"
            description: "用户名"
          - name: "X-Invoke-User"
            value: "apigateway"
            in: "header"
            origin: "CONSTANT"
            description: "调用者"
表1 参数说明

参数

是否必选

类型

说明

name

String

参数名称,由字母、数字、下划线、连线、点组成,以字母开头,最长32字节

header位置的参数名称不区分大小写

value

String

参数值,当参数来源为REQUEST时,值为请求参数名称

in

String

参数位置,支持header、query、path

origin

String

参数映射来源,支持REQUEST、CONSTANT

description

String

参数含义描述

support.huaweicloud.com/usermanual-apig/apig_03_0091.html