我正在尝试使用 GCP API Gateway 为我的几个后端服务(A、B、C、D)创建一个端点,每个端点都有自己的路径结构。我为以下服务之一配置了网关:
swagger: '2.0'
info:
title: <TITLE>
description: <DESC>
version: 1.0.0
schemes:
- https
produces:
- application/json
paths:
/service_a/match/{id_}:
get:
summary: <SUMMARY>
description: <DESC>
operationId: match_id_
parameters:
- required: true
type: string
name: id_
in: path
- required: true
type: boolean
default: false
name: bool_first
in: query
- required: false
type: boolean
default: false
name: bool_Second
in: query
x-google-backend:
address: <cloud_run_url>/match/{id_}
deadline: 60.0
responses:
'200':
description: Successful Response
'422':
description: Validation
这部署得很好。但是当我到达端点时gateway_url/service_a/match/123
,它会被路由到cloud_run_url/match/%7Bid_%7D?id_=123
而不是cloud_run_url/match/123
.
我怎样才能解决这个问题?