From 6cf0600d1a087acab78126a928cd14bf366fa4cb Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Thu, 18 Jan 2024 21:18:45 +0000 Subject: [PATCH 1/2] Fix Ruby not mapping document data properly --- templates/ruby/lib/container/models/model.rb.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/ruby/lib/container/models/model.rb.twig b/templates/ruby/lib/container/models/model.rb.twig index a60c19df3e..92390e4308 100644 --- a/templates/ruby/lib/container/models/model.rb.twig +++ b/templates/ruby/lib/container/models/model.rb.twig @@ -32,7 +32,7 @@ module {{ spec.title | caseUcfirst }} {% endfor %} {% if definition.additionalProperties %} - data: map["data"] + data: map.reject { |k,_| k.start_with?("$") } {% endif %} ) end From 22a9eedc6b37c1d27964cc7565283c822f36030d Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Thu, 18 Jan 2024 21:22:55 +0000 Subject: [PATCH 2/2] Don't reject $ because users might define these, too --- templates/ruby/lib/container/models/model.rb.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/ruby/lib/container/models/model.rb.twig b/templates/ruby/lib/container/models/model.rb.twig index 92390e4308..b8468a58ee 100644 --- a/templates/ruby/lib/container/models/model.rb.twig +++ b/templates/ruby/lib/container/models/model.rb.twig @@ -32,7 +32,7 @@ module {{ spec.title | caseUcfirst }} {% endfor %} {% if definition.additionalProperties %} - data: map.reject { |k,_| k.start_with?("$") } + data: map {% endif %} ) end