swagger 2.0. parameters in path cannot be reuse in backend call
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2023
06:55 AM
03-20-2023
06:55 AM
swagger 2.0. parameters in path cannot be reuse in backend call
I have this path in and endpoint definition in swagger 2.0:
paths: /custom_texts/{lang}: get: parameters: - in: path name: lang required: true type: string x-backend: address: https://another-server.com/translation{lang}
To call it: http://myserver/custom_texts/en but the the backend is called like this: http://myserver/custom_texts/?lang=en
I tried with $request.path.lang but does not worked either? How can i use the value of the lang parameter in the backend call? Thank you.
EDIT I tried with https://swagger.io/docs/specification/callbacks/ But this does not get interpreted:
address: https://another-server.com/translation{$request.query.lang}
2 REPLIES 2
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2023
12:10 PM
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2023
12:55 PM
03-20-2023
12:55 PM
No i can't. I must use 2.0.
