class Lutaml::Model::Schema::JsonSchemaParser
def self.generate_attributes(attributes, required_attributes)
def self.generate_attributes(attributes, required_attributes) attributes.map do |name, schema| type = schema["type"] ruby_type = get_ruby_type(type, schema) attributes = [ "attribute :#{name}", "Lutaml::Model::Type::#{ruby_type}", "required: #{required_attributes.include?(name).inspect}", ] attributes.join(", ") end.join("\n ") end