-
Notifications
You must be signed in to change notification settings - Fork 761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No way to prevent encoding in serverVariables injection #3656
Comments
Thank you @paztis, and good catch. We don't have the resources to look into this right now, but would welcome a PR :) |
@char0n are you able to take a look though? |
Hi @paztis, Thanks for the issue. If we want to support “SaaS on On-Premise” usecase, which we do - then we have to turn off the default encoding. I'm on it. |
This will allow Saas and On-Premise usecase to be handled correctly. Encoding can be turned on again by providing serverVariableEncoder option. Refs #3656
Addressed in #3660 |
## [3.29.3](v3.29.2...v3.29.3) (2024-09-13) ### Bug Fixes * **execute:** do not encode server variables by default ([6a151d9](6a151d9)), closes [#3656](#3656)
Since this PR: https://github.com/swagger-api/swagger-js/pull/3557/files all the serverVariables are automatically encoded.
We use serverVariable to manage the protocol://host:port, but :// are encoded
https://github.com/swagger-api/swagger-js/blame/b52871ebcc396c873c5616724cd191547c730e4e/src/execute/index.js#L362
openapi-server-url-templating is allowing to provide customEncoder. Is it possible to add a topLevel optional serverVariablesEncoder to be able to cover our case ? Or to disable the encoding by default ?
the Saas and On-Premise specification provide this example of serverVariables https://swagger.io/docs/specification/api-host-and-base-path/
and it no more works
The text was updated successfully, but these errors were encountered: