Adds Camelize Keys Method to Definitions

This commit is contained in:
Muhammad Nawzad
2023-11-12 14:48:46 +03:00
parent 92d9f33d20
commit e25dfff4ec
2 changed files with 14 additions and 0 deletions

View File

@@ -95,5 +95,9 @@ module Schemable
def model_name
self.class.name.gsub('Swagger::Definitions::', '').pluralize.underscore.downcase
end
def camelize_keys(hash)
hash.deep_transform_keys { |key| key.to_s.camelize(:lower).to_sym }
end
end
end