Andrei
Andrei

Reputation: 198

GCP Endpoints Path Templating mapping issue

Got following issue using OpenAPI / Swagger with ESP 1.35.0 on Cloud Run:

 /go/{ppage}/subitem:
   get:
     summary: Get a subitem
     operationId: ppage
     parameters:
       - in: path
         name: ppage
         type: string
         required: true
         description: Get/Retrieve a subitem
     x-google-backend:
       address: https://example.com/go

Given an operation config above, path gets translated into https://example.com/go?ppage=m2jobs, where:

Is it correct/expected?

Please advise.

Upvotes: 1

Views: 278

Answers (1)

guillaume blaquiere
guillaume blaquiere

Reputation: 75735

Indeed, according with the following link, the backend proto translates the path parameter to query parameter and the /path/ vanishes after the first /{path param}/

https://github.com/googleapis/googleapis/blob/master/google/api/backend.proto#L35-L91

Your assumptions are correct!

Best

Upvotes: 1

Related Questions