mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-24 18:49:15 +00:00
Ruby-client: Don't encode slashes if strict-spec false (#3204)
URL-special characters such as /,?,% should be encoded when inside path parameters. I changed the Ruby-client to do so. https://github.com/OpenAPITools/openapi-generator/pull/3039 Unfortunately, some projects relied on slashes not being expanded within path paramters: https://github.com/OpenAPITools/openapi-generator/issues/3119 With this commit, these projects can now pass `--strict-spec false` to not have / converted to %2F. strict spec not specified: / -> %2F --strict-spec true: / -> %2F --strict-spec false: / -> /
This commit is contained in:
committed by
Akira Tanimura
parent
4ac33d80f0
commit
034064be4c
@@ -562,6 +562,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
||||
operation.put("classVarName", config.toApiVarName(tag));
|
||||
operation.put("importPath", config.toApiImport(tag));
|
||||
operation.put("classFilename", config.toApiFilename(tag));
|
||||
operation.put("strictSpecBehavior", config.isStrictSpecBehavior());
|
||||
|
||||
if (allModels == null || allModels.isEmpty()) {
|
||||
operation.put("hasModel", false);
|
||||
|
||||
Reference in New Issue
Block a user