.generator/src/generator/templates/api.j2 in datadog_api_client-2.11.0 vs .generator/src/generator/templates/api.j2 in datadog_api_client-2.12.0

- old
+ new

@@ -114,10 +114,10 @@ fail ArgumentError, 'invalid value for "{% if parameter.required %}{{ name|attribute_name }}{% else %}opts[:"{{ name|attribute_name }}"]{% endif %}" when calling {{classname}}.{{ operation.operationId|snake_case }}, must be greater than {% if not parameter.exclusiveMinimum %}or equal to {% endif %}{{ schema.minimum }}.' end {%- endif %} {%- if schema.pattern is defined %} - pattern = Regexp.new({{ schema.pattern }}) + pattern = Regexp.new("{{ schema.pattern }}") if @api_client.config.client_side_validation && {% if not parameter.required %}!opts[:'{{ name|attribute_name }}'].nil? && {% endif %}{% if parameter.required %}{{ name|attribute_name }}{% else %}opts[:'{{ name|attribute_name }}']{% endif %} !~ pattern fail ArgumentError, "invalid value for '{% if parameter.required %}{{ name|attribute_name }}{% else %}opts[:\"{{ name|attribute_name }}\"]{% endif %}' when calling {{classname}}.{{ operation.operationId|snake_case }}, must conform to the pattern #{pattern}." end {%- endif %}