Skip to content

Commit

Permalink
fix: specs failing due to order
Browse files Browse the repository at this point in the history
  • Loading branch information
HassanAkbar authored and ronaldtse committed Oct 22, 2024
1 parent 530cf06 commit 267f9dc
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/metaschema/assembly_model_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class AssemblyModelType < Lutaml::Model::Serializable
attribute :any, AnyType

xml do
root "AssemblyModelType"
root "AssemblyModelType", ordered: true
namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"

map_element "field", to: :field
Expand Down
2 changes: 1 addition & 1 deletion lib/metaschema/global_assembly_definition_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class GlobalAssemblyDefinitionType < Lutaml::Model::Serializable
attribute :example, ExampleType, collection: true

xml do
root "GlobalAssemblyDefinitionType"
root "GlobalAssemblyDefinitionType", ordered: true
namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"

map_attribute "name", to: :name
Expand Down
2 changes: 2 additions & 0 deletions lib/metaschema/global_field_definition_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class GlobalFieldDefinitionType < Lutaml::Model::Serializable
attribute :name, :string
attribute :index, :integer
attribute :scope, :string, default: -> { "global" }
attribute :collapsible, :string, default: -> { "no" }
attribute :deprecated, :string
attribute :formal_name, :string
attribute :description, MarkupLineDatatype
Expand All @@ -42,6 +43,7 @@ class GlobalFieldDefinitionType < Lutaml::Model::Serializable
map_attribute "index", to: :index
map_attribute "scope", to: :scope
map_attribute "deprecated", to: :deprecated
map_attribute "collapsible", to: :collapsible
map_element "formal-name", to: :formal_name
map_element "description", to: :description
map_element "prop", to: :prop
Expand Down
2 changes: 1 addition & 1 deletion lib/metaschema/inline_markup_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class InlineMarkupType < Lutaml::Model::Serializable
attribute :img, ImageType, collection: true

xml do
root "inlineMarkupType"
root "inlineMarkupType", ordered: true
namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"

map_content to: :content
Expand Down
2 changes: 1 addition & 1 deletion lib/metaschema/markup_line_datatype.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MarkupLineDatatype < Lutaml::Model::Serializable
attribute :img, ImageType, collection: true

xml do
root "MarkupLineDatatype"
root "MarkupLineDatatype", ordered: true
namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"

map_content to: :content
Expand Down
2 changes: 1 addition & 1 deletion lib/metaschema/root.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Root < Lutaml::Model::Serializable
attribute :define_flag, GlobalFlagDefinitionType, collection: true

xml do
root "METASCHEMA"
root "METASCHEMA", ordered: true
namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"

map_attribute "abstract", to: :abstract
Expand Down

0 comments on commit 267f9dc

Please sign in to comment.