From 33d42c8c8f61c3a0d27e3fab90dc5799a6dd6fad Mon Sep 17 00:00:00 2001 From: Muhammad Nawzad Date: Sat, 29 Jul 2023 14:22:33 +0300 Subject: [PATCH] Fixes bug where required attributes were not caught properly due case difference --- lib/schemable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/schemable.rb b/lib/schemable.rb index 8d5c628..a191639 100644 --- a/lib/schemable.rb +++ b/lib/schemable.rb @@ -529,7 +529,7 @@ module Schemable end required_attributes = { - required: schema.as_json['properties']['data']['properties'].keys - optional_request_attributes.map(&:to_s) - nullable_attributes.map(&:to_s) + required: (schema.as_json['properties']['data']['properties'].keys - optional_request_attributes.map(&:to_s) - nullable_attributes.map(&:to_s)).map { |key| key.to_s.camelize(:lower).to_sym } } schema = modify_schema(schema, required_attributes, "properties.data")