Skip to content

No way to prevent encoding in serverVariables injection #3656

@paztis

Description

@paztis

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/
image

and it no more works

Metadata

Metadata

Assignees

Labels

P2jiraThis is also tracked in Jirapull-request-welcomeThat the core team don't have the resources, but would welcome a community PRtype: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions