Skip to content

Commit

Permalink
fixing failing specs
Browse files Browse the repository at this point in the history
  • Loading branch information
suleman-uzair committed Jan 30, 2025
1 parent 59835f9 commit 211dae4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/lutaml/xsd/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def include_to_schema(model, parent, _doc)
private

def setup_import_and_include(klass, model, schema, args = {})
instance = init_instance_of(klass, schema.dig("attributes") || {}, args)
instance = init_instance_of(klass, schema["attributes"] || {}, args)
annotation_object(instance, schema)
model.send("#{klass}s") << instance
schema_path = instance.schema_path
Expand Down Expand Up @@ -132,7 +132,7 @@ def schema_by_location_or_instance(instance)
end

def annotation_object(instance, schema)
elements = schema.fetch("elements") || {}
elements = schema["elements"] || {}
annotation_key = elements.keys.find { |key| key.include?("annotation") }
return unless annotation_key

Expand Down
2 changes: 1 addition & 1 deletion spec/lutaml/xsd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"metaschema-prose-module": "spec/lutaml/fixtures",
"metaschema-markup-line": "spec/lutaml/fixtures",
metaschema: "spec/lutaml/fixtures",
"unitsml-v1.0-csd03": nil,
"unitsml-v1.0-csd03": nil
}.freeze

RSpec.describe Lutaml::Xsd do
Expand Down

0 comments on commit 211dae4

Please sign in to comment.