diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java index 7a76a472269..56a4a25a2b9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java @@ -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); diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api.mustache index 1c5a053a9b9..bebf2fcae86 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api.mustache @@ -123,7 +123,7 @@ module {{moduleName}} {{/hasValidation}} {{/allParams}} # resource path - local_var_path = '{{{path}}}'{{#pathParams}}.sub('{' + '{{baseName}}' + '}', CGI.escape({{paramName}}.to_s)){{/pathParams}} + local_var_path = '{{{path}}}'{{#pathParams}}.sub('{' + '{{baseName}}' + '}', CGI.escape({{paramName}}.to_s){{^strictSpecBehavior}}.gsub('%2F', '/'){{/strictSpecBehavior}}){{/pathParams}} # query parameters query_params = opts[:query_params] || {}