metaschema 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec_status +64 -0
  3. data/.rubocop.yml +1 -0
  4. data/.rubocop_todo.yml +76 -0
  5. data/Rakefile +3 -3
  6. data/exe/metaschema +2 -2
  7. data/lib/metaschema/allowed_value_type.rb +24 -22
  8. data/lib/metaschema/allowed_values_type.rb +21 -19
  9. data/lib/metaschema/anchor_type.rb +19 -17
  10. data/lib/metaschema/any_type.rb +5 -3
  11. data/lib/metaschema/assembly.rb +24 -22
  12. data/lib/metaschema/assembly_model_type.rb +19 -17
  13. data/lib/metaschema/assembly_reference_type.rb +23 -21
  14. data/lib/metaschema/block_quote_type.rb +25 -23
  15. data/lib/metaschema/choice_type.rb +13 -11
  16. data/lib/metaschema/code_type.rb +23 -21
  17. data/lib/metaschema/constraint_let_type.rb +9 -7
  18. data/lib/metaschema/define_assembly_constraints_type.rb +23 -21
  19. data/lib/metaschema/define_field_constraints_type.rb +17 -15
  20. data/lib/metaschema/define_flag_constraints_type.rb +17 -15
  21. data/lib/metaschema/example_type.rb +11 -9
  22. data/lib/metaschema/expect_constraint_type.rb +17 -15
  23. data/lib/metaschema/field.rb +18 -16
  24. data/lib/metaschema/field_reference_type.rb +26 -24
  25. data/lib/metaschema/flag.rb +18 -16
  26. data/lib/metaschema/flag_reference_type.rb +20 -18
  27. data/lib/metaschema/global_assembly_definition_type.rb +33 -31
  28. data/lib/metaschema/global_field_definition_type.rb +37 -33
  29. data/lib/metaschema/global_flag_definition_type.rb +26 -24
  30. data/lib/metaschema/group_as_type.rb +10 -8
  31. data/lib/metaschema/grouped_assembly_reference_type.rb +17 -15
  32. data/lib/metaschema/grouped_choice_type.rb +23 -21
  33. data/lib/metaschema/grouped_field_reference_type.rb +17 -15
  34. data/lib/metaschema/grouped_inline_assembly_definition_type.rb +28 -26
  35. data/lib/metaschema/grouped_inline_field_definition_type.rb +35 -33
  36. data/lib/metaschema/image_type.rb +8 -6
  37. data/lib/metaschema/import.rb +6 -4
  38. data/lib/metaschema/index_has_key_constraint_type.rb +18 -16
  39. data/lib/metaschema/inline_assembly_definition_type.rb +35 -33
  40. data/lib/metaschema/inline_field_definition_type.rb +41 -39
  41. data/lib/metaschema/inline_flag_definition_type.rb +24 -22
  42. data/lib/metaschema/inline_markup_type.rb +19 -17
  43. data/lib/metaschema/insert_type.rb +7 -5
  44. data/lib/metaschema/json_key_type.rb +6 -4
  45. data/lib/metaschema/json_value_key_flag_type.rb +6 -4
  46. data/lib/metaschema/key_field.rb +9 -7
  47. data/lib/metaschema/list_item_type.rb +36 -34
  48. data/lib/metaschema/list_type.rb +7 -5
  49. data/lib/metaschema/markup_line_datatype.rb +22 -20
  50. data/lib/metaschema/matches_constraint_type.rb +17 -15
  51. data/lib/metaschema/metaschema_import_type.rb +6 -4
  52. data/lib/metaschema/metaschemaconstraints.rb +15 -13
  53. data/lib/metaschema/namespace_binding_type.rb +7 -5
  54. data/lib/metaschema/ordered_list_type.rb +7 -5
  55. data/lib/metaschema/preformatted_type.rb +22 -20
  56. data/lib/metaschema/property_type.rb +9 -7
  57. data/lib/metaschema/remarks_type.rb +28 -26
  58. data/lib/metaschema/root.rb +27 -25
  59. data/lib/metaschema/root_name.rb +6 -4
  60. data/lib/metaschema/scope.rb +13 -11
  61. data/lib/metaschema/table_cell_type.rb +24 -22
  62. data/lib/metaschema/table_row_type.rb +8 -6
  63. data/lib/metaschema/table_type.rb +7 -5
  64. data/lib/metaschema/targeted_allowed_values_constraint_type.rb +22 -20
  65. data/lib/metaschema/targeted_expect_constraint_type.rb +18 -16
  66. data/lib/metaschema/targeted_has_cardinality_constraint_type.rb +18 -16
  67. data/lib/metaschema/targeted_index_constraint_type.rb +19 -17
  68. data/lib/metaschema/targeted_index_has_key_constraint_type.rb +19 -17
  69. data/lib/metaschema/targeted_key_constraint_type.rb +18 -16
  70. data/lib/metaschema/targeted_matches_constraint_type.rb +18 -16
  71. data/lib/metaschema/use_name_type.rb +6 -4
  72. data/lib/metaschema/version.rb +1 -1
  73. data/lib/metaschema.rb +4 -4
  74. metadata +9 -6
@@ -1,23 +1,25 @@
1
- require "lutaml/model"
1
+ # frozen_string_literal: true
2
+
3
+ require 'lutaml/model'
2
4
 
3
5
  # require_relative "assembly_model_type"
4
- require_relative "define_assembly_constraints_type"
5
- require_relative "example_type"
6
- require_relative "flag_reference_type"
7
- require_relative "group_as_type"
8
- require_relative "inline_flag_definition_type"
9
- require_relative "json_key_type"
10
- require_relative "json_value_key_flag_type"
11
- require_relative "markup_line_datatype"
12
- require_relative "property_type"
13
- require_relative "remarks_type"
6
+ require_relative 'define_assembly_constraints_type'
7
+ require_relative 'example_type'
8
+ require_relative 'flag_reference_type'
9
+ require_relative 'group_as_type'
10
+ require_relative 'inline_flag_definition_type'
11
+ require_relative 'json_key_type'
12
+ require_relative 'json_value_key_flag_type'
13
+ require_relative 'markup_line_datatype'
14
+ require_relative 'property_type'
15
+ require_relative 'remarks_type'
14
16
 
15
17
  module Metaschema
16
18
  class AssemblyModelType < Lutaml::Model::Serializable; end
17
19
 
18
20
  class InlineAssemblyDefinitionType < Lutaml::Model::Serializable
19
- attribute :min_occurs, :integer, default: -> { "0" }
20
- attribute :max_occurs, :string, default: -> { "1" }
21
+ attribute :min_occurs, :integer, default: -> { '0' }
22
+ attribute :max_occurs, :string, default: -> { '1' }
21
23
  attribute :name, :string
22
24
  attribute :index, :integer
23
25
  attribute :deprecated, :string
@@ -36,27 +38,27 @@ module Metaschema
36
38
  attribute :example, ExampleType, collection: true
37
39
 
38
40
  xml do
39
- root "InlineAssemblyDefinitionType"
40
- namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"
41
+ root 'InlineAssemblyDefinitionType'
42
+ namespace 'http://csrc.nist.gov/ns/oscal/metaschema/1.0'
41
43
 
42
- map_attribute "min-occurs", to: :min_occurs
43
- map_attribute "max-occurs", to: :max_occurs
44
- map_attribute "name", to: :name
45
- map_attribute "index", to: :index
46
- map_attribute "deprecated", to: :deprecated
47
- map_element "formal-name", to: :formal_name
48
- map_element "description", to: :description
49
- map_element "prop", to: :prop
50
- map_element "json-key", to: :json_key
51
- map_element "json-value-key", to: :json_value_key
52
- map_element "json-value-key-flag", to: :json_value_key_flag
53
- map_element "group-as", to: :group_as
54
- map_element "flag", to: :flag
55
- map_element "define-flag", to: :define_flag
56
- map_element "model", to: :model
57
- map_element "constraint", to: :constraint
58
- map_element "remarks", to: :remarks
59
- map_element "example", to: :example
44
+ map_attribute 'min-occurs', to: :min_occurs
45
+ map_attribute 'max-occurs', to: :max_occurs
46
+ map_attribute 'name', to: :name
47
+ map_attribute 'index', to: :index
48
+ map_attribute 'deprecated', to: :deprecated
49
+ map_element 'formal-name', to: :formal_name
50
+ map_element 'description', to: :description
51
+ map_element 'prop', to: :prop
52
+ map_element 'json-key', to: :json_key
53
+ map_element 'json-value-key', to: :json_value_key
54
+ map_element 'json-value-key-flag', to: :json_value_key_flag
55
+ map_element 'group-as', to: :group_as
56
+ map_element 'flag', to: :flag
57
+ map_element 'define-flag', to: :define_flag
58
+ map_element 'model', to: :model
59
+ map_element 'constraint', to: :constraint
60
+ map_element 'remarks', to: :remarks
61
+ map_element 'example', to: :example
60
62
  end
61
63
  end
62
64
  end
@@ -1,26 +1,28 @@
1
- require "lutaml/model"
1
+ # frozen_string_literal: true
2
2
 
3
- require_relative "define_field_constraints_type"
4
- require_relative "example_type"
5
- require_relative "flag_reference_type"
6
- require_relative "group_as_type"
7
- require_relative "inline_flag_definition_type"
8
- require_relative "json_key_type"
9
- require_relative "json_value_key_flag_type"
10
- require_relative "markup_line_datatype"
11
- require_relative "property_type"
12
- require_relative "remarks_type"
3
+ require 'lutaml/model'
4
+
5
+ require_relative 'define_field_constraints_type'
6
+ require_relative 'example_type'
7
+ require_relative 'flag_reference_type'
8
+ require_relative 'group_as_type'
9
+ require_relative 'inline_flag_definition_type'
10
+ require_relative 'json_key_type'
11
+ require_relative 'json_value_key_flag_type'
12
+ require_relative 'markup_line_datatype'
13
+ require_relative 'property_type'
14
+ require_relative 'remarks_type'
13
15
 
14
16
  module Metaschema
15
17
  class InlineFieldDefinitionType < Lutaml::Model::Serializable
16
- attribute :as_type, :string, default: -> { "string" }
18
+ attribute :as_type, :string, default: -> { 'string' }
17
19
  attribute :default, :string
18
- attribute :collapsible, :string, default: -> { "no" }
19
- attribute :min_occurs, :integer, default: -> { "0" }
20
- attribute :max_occurs, :string, default: -> { "1" }
20
+ attribute :collapsible, :string, default: -> { 'no' }
21
+ attribute :min_occurs, :integer, default: -> { '0' }
22
+ attribute :max_occurs, :string, default: -> { '1' }
21
23
  attribute :name, :string
22
24
  attribute :index, :integer
23
- attribute :in_xml, :string, default: -> { "WRAPPED" }
25
+ attribute :in_xml, :string, default: -> { 'WRAPPED' }
24
26
  attribute :deprecated, :string
25
27
  attribute :formal_name, :string
26
28
  attribute :description, MarkupLineDatatype
@@ -36,30 +38,30 @@ module Metaschema
36
38
  attribute :example, ExampleType, collection: true
37
39
 
38
40
  xml do
39
- root "InlineFieldDefinitionType"
40
- namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"
41
+ root 'InlineFieldDefinitionType'
42
+ namespace 'http://csrc.nist.gov/ns/oscal/metaschema/1.0'
41
43
 
42
- map_attribute "as-type", to: :as_type
43
- map_attribute "default", to: :default
44
- map_attribute "collapsible", to: :collapsible
45
- map_attribute "min-occurs", to: :min_occurs
46
- map_attribute "max-occurs", to: :max_occurs
47
- map_attribute "name", to: :name
48
- map_attribute "index", to: :index
49
- map_attribute "in-xml", to: :in_xml
50
- map_attribute "deprecated", to: :deprecated
51
- map_element "formal-name", to: :formal_name
52
- map_element "description", to: :description
53
- map_element "prop", to: :prop
54
- map_element "json-key", to: :json_key
55
- map_element "json-value-key", to: :json_value_key
56
- map_element "json-value-key-flag", to: :json_value_key_flag
57
- map_element "group-as", to: :group_as
58
- map_element "flag", to: :flag
59
- map_element "define-flag", to: :define_flag
60
- map_element "constraint", to: :constraint
61
- map_element "remarks", to: :remarks
62
- map_element "example", to: :example
44
+ map_attribute 'as-type', to: :as_type
45
+ map_attribute 'default', to: :default
46
+ map_attribute 'collapsible', to: :collapsible
47
+ map_attribute 'min-occurs', to: :min_occurs
48
+ map_attribute 'max-occurs', to: :max_occurs
49
+ map_attribute 'name', to: :name
50
+ map_attribute 'index', to: :index
51
+ map_attribute 'in-xml', to: :in_xml
52
+ map_attribute 'deprecated', to: :deprecated
53
+ map_element 'formal-name', to: :formal_name
54
+ map_element 'description', to: :description
55
+ map_element 'prop', to: :prop
56
+ map_element 'json-key', to: :json_key
57
+ map_element 'json-value-key', to: :json_value_key
58
+ map_element 'json-value-key-flag', to: :json_value_key_flag
59
+ map_element 'group-as', to: :group_as
60
+ map_element 'flag', to: :flag
61
+ map_element 'define-flag', to: :define_flag
62
+ map_element 'constraint', to: :constraint
63
+ map_element 'remarks', to: :remarks
64
+ map_element 'example', to: :example
63
65
  end
64
66
  end
65
67
  end
@@ -1,18 +1,20 @@
1
- require "lutaml/model"
1
+ # frozen_string_literal: true
2
2
 
3
- require_relative "define_flag_constraints_type"
4
- require_relative "example_type"
5
- require_relative "markup_line_datatype"
6
- require_relative "property_type"
7
- require_relative "remarks_type"
3
+ require 'lutaml/model'
4
+
5
+ require_relative 'define_flag_constraints_type'
6
+ require_relative 'example_type'
7
+ require_relative 'markup_line_datatype'
8
+ require_relative 'property_type'
9
+ require_relative 'remarks_type'
8
10
 
9
11
  module Metaschema
10
12
  class InlineFlagDefinitionType < Lutaml::Model::Serializable
11
13
  attribute :name, :string
12
14
  attribute :index, :integer
13
- attribute :as_type, :string, default: -> { "string" }
15
+ attribute :as_type, :string, default: -> { 'string' }
14
16
  attribute :default, :string
15
- attribute :required, :string, default: -> { "no" }
17
+ attribute :required, :string, default: -> { 'no' }
16
18
  attribute :deprecated, :string
17
19
  attribute :formal_name, :string
18
20
  attribute :description, MarkupLineDatatype
@@ -22,21 +24,21 @@ module Metaschema
22
24
  attribute :example, ExampleType, collection: true
23
25
 
24
26
  xml do
25
- root "InlineFlagDefinitionType"
26
- namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"
27
+ root 'InlineFlagDefinitionType'
28
+ namespace 'http://csrc.nist.gov/ns/oscal/metaschema/1.0'
27
29
 
28
- map_attribute "name", to: :name
29
- map_attribute "index", to: :index
30
- map_attribute "as-type", to: :as_type
31
- map_attribute "default", to: :default
32
- map_attribute "required", to: :required
33
- map_attribute "deprecated", to: :deprecated
34
- map_element "formal-name", to: :formal_name
35
- map_element "description", to: :description
36
- map_element "prop", to: :prop
37
- map_element "constraint", to: :constraint
38
- map_element "remarks", to: :remarks
39
- map_element "example", to: :example
30
+ map_attribute 'name', to: :name
31
+ map_attribute 'index', to: :index
32
+ map_attribute 'as-type', to: :as_type
33
+ map_attribute 'default', to: :default
34
+ map_attribute 'required', to: :required
35
+ map_attribute 'deprecated', to: :deprecated
36
+ map_element 'formal-name', to: :formal_name
37
+ map_element 'description', to: :description
38
+ map_element 'prop', to: :prop
39
+ map_element 'constraint', to: :constraint
40
+ map_element 'remarks', to: :remarks
41
+ map_element 'example', to: :example
40
42
  end
41
43
  end
42
44
  end
@@ -1,9 +1,11 @@
1
- require "lutaml/model"
1
+ # frozen_string_literal: true
2
+
3
+ require 'lutaml/model'
2
4
 
3
5
  # require_relative "anchor_type"
4
6
  # require_relative "code_type"
5
- require_relative "image_type"
6
- require_relative "insert_type"
7
+ require_relative 'image_type'
8
+ require_relative 'insert_type'
7
9
 
8
10
  module Metaschema
9
11
  class AnchorType < Lutaml::Model::Serializable
@@ -28,22 +30,22 @@ module Metaschema
28
30
  attribute :img, ImageType, collection: true
29
31
 
30
32
  xml do
31
- root "inlineMarkupType"
32
- namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"
33
+ root 'inlineMarkupType', mixed: true
34
+ namespace 'http://csrc.nist.gov/ns/oscal/metaschema/1.0'
33
35
 
34
36
  map_content to: :content
35
- map_element "a", to: :a
36
- map_element "insert", to: :insert
37
- map_element "br", to: :br
38
- map_element "code", to: :code
39
- map_element "em", to: :em
40
- map_element "i", to: :i
41
- map_element "b", to: :b
42
- map_element "strong", to: :strong
43
- map_element "sub", to: :sub
44
- map_element "sup", to: :sup
45
- map_element "q", to: :q
46
- map_element "img", to: :img
37
+ map_element 'a', to: :a
38
+ map_element 'insert', to: :insert
39
+ map_element 'br', to: :br
40
+ map_element 'code', to: :code
41
+ map_element 'em', to: :em
42
+ map_element 'i', to: :i
43
+ map_element 'b', to: :b
44
+ map_element 'strong', to: :strong
45
+ map_element 'sub', to: :sub
46
+ map_element 'sup', to: :sup
47
+ map_element 'q', to: :q
48
+ map_element 'img', to: :img
47
49
  end
48
50
  end
49
51
  end
@@ -1,4 +1,6 @@
1
- require "lutaml/model"
1
+ # frozen_string_literal: true
2
+
3
+ require 'lutaml/model'
2
4
 
3
5
  module Metaschema
4
6
  class InsertType < Lutaml::Model::Serializable
@@ -6,11 +8,11 @@ module Metaschema
6
8
  attribute :id_ref, :string
7
9
 
8
10
  xml do
9
- root "insertType"
10
- namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"
11
+ root 'insertType'
12
+ namespace 'http://csrc.nist.gov/ns/oscal/metaschema/1.0'
11
13
 
12
- map_attribute "type", to: :type
13
- map_attribute "id-ref", to: :id_ref
14
+ map_attribute 'type', to: :type
15
+ map_attribute 'id-ref', to: :id_ref
14
16
  end
15
17
  end
16
18
  end
@@ -1,14 +1,16 @@
1
- require "lutaml/model"
1
+ # frozen_string_literal: true
2
+
3
+ require 'lutaml/model'
2
4
 
3
5
  module Metaschema
4
6
  class JsonKeyType < Lutaml::Model::Serializable
5
7
  attribute :flag_ref, :string
6
8
 
7
9
  xml do
8
- root "JsonKeyType"
9
- namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"
10
+ root 'JsonKeyType'
11
+ namespace 'http://csrc.nist.gov/ns/oscal/metaschema/1.0'
10
12
 
11
- map_attribute "flag-ref", to: :flag_ref
13
+ map_attribute 'flag-ref', to: :flag_ref
12
14
  end
13
15
  end
14
16
  end
@@ -1,14 +1,16 @@
1
- require "lutaml/model"
1
+ # frozen_string_literal: true
2
+
3
+ require 'lutaml/model'
2
4
 
3
5
  module Metaschema
4
6
  class JsonValueKeyFlagType < Lutaml::Model::Serializable
5
7
  attribute :flag_ref, :string
6
8
 
7
9
  xml do
8
- root "JsonValueKeyFlagType"
9
- namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"
10
+ root 'JsonValueKeyFlagType'
11
+ namespace 'http://csrc.nist.gov/ns/oscal/metaschema/1.0'
10
12
 
11
- map_attribute "flag-ref", to: :flag_ref
13
+ map_attribute 'flag-ref', to: :flag_ref
12
14
  end
13
15
  end
14
16
  end
@@ -1,6 +1,8 @@
1
- require "lutaml/model"
1
+ # frozen_string_literal: true
2
2
 
3
- require_relative "remarks_type"
3
+ require 'lutaml/model'
4
+
5
+ require_relative 'remarks_type'
4
6
 
5
7
  module Metaschema
6
8
  class KeyField < Lutaml::Model::Serializable
@@ -9,12 +11,12 @@ module Metaschema
9
11
  attribute :remarks, RemarksType
10
12
 
11
13
  xml do
12
- root "key-field"
13
- namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"
14
+ root 'key-field'
15
+ namespace 'http://csrc.nist.gov/ns/oscal/metaschema/1.0'
14
16
 
15
- map_attribute "target", to: :target
16
- map_attribute "pattern", to: :pattern
17
- map_element "remarks", to: :remarks
17
+ map_attribute 'target', to: :target
18
+ map_attribute 'pattern', to: :pattern
19
+ map_element 'remarks', to: :remarks
18
20
  end
19
21
  end
20
22
  end
@@ -1,14 +1,16 @@
1
- require "lutaml/model"
1
+ # frozen_string_literal: true
2
2
 
3
- require_relative "anchor_type"
3
+ require 'lutaml/model'
4
+
5
+ require_relative 'anchor_type'
4
6
  # require_relative "block_quote_type"
5
- require_relative "code_type"
6
- require_relative "image_type"
7
- require_relative "inline_markup_type"
8
- require_relative "insert_type"
7
+ require_relative 'code_type'
8
+ require_relative 'image_type'
9
+ require_relative 'inline_markup_type'
10
+ require_relative 'insert_type'
9
11
  # require_relative "list_type"
10
- require_relative "ordered_list_type"
11
- require_relative "preformatted_type"
12
+ require_relative 'ordered_list_type'
13
+ require_relative 'preformatted_type'
12
14
 
13
15
  module Metaschema
14
16
  class ListType < Lutaml::Model::Serializable; end
@@ -42,34 +44,34 @@ module Metaschema
42
44
  attribute :p, InlineMarkupType, collection: true
43
45
 
44
46
  xml do
45
- root "listItemType"
46
- namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"
47
+ root 'listItemType', mixed: true
48
+ namespace 'http://csrc.nist.gov/ns/oscal/metaschema/1.0'
47
49
 
48
50
  map_content to: :content
49
- map_element "a", to: :a
50
- map_element "insert", to: :insert
51
- map_element "br", to: :br
52
- map_element "code", to: :code
53
- map_element "em", to: :em
54
- map_element "i", to: :i
55
- map_element "b", to: :b
56
- map_element "strong", to: :strong
57
- map_element "sub", to: :sub
58
- map_element "sup", to: :sup
59
- map_element "q", to: :q
60
- map_element "img", to: :img
61
- map_element "ul", to: :ul
62
- map_element "ol", to: :ol
63
- map_element "pre", to: :pre
64
- map_element "hr", to: :hr
65
- map_element "blockquote", to: :blockquote
66
- map_element "h1", to: :h1
67
- map_element "h2", to: :h2
68
- map_element "h3", to: :h3
69
- map_element "h4", to: :h4
70
- map_element "h5", to: :h5
71
- map_element "h6", to: :h6
72
- map_element "p", to: :p
51
+ map_element 'a', to: :a
52
+ map_element 'insert', to: :insert
53
+ map_element 'br', to: :br
54
+ map_element 'code', to: :code
55
+ map_element 'em', to: :em
56
+ map_element 'i', to: :i
57
+ map_element 'b', to: :b
58
+ map_element 'strong', to: :strong
59
+ map_element 'sub', to: :sub
60
+ map_element 'sup', to: :sup
61
+ map_element 'q', to: :q
62
+ map_element 'img', to: :img
63
+ map_element 'ul', to: :ul
64
+ map_element 'ol', to: :ol
65
+ map_element 'pre', to: :pre
66
+ map_element 'hr', to: :hr
67
+ map_element 'blockquote', to: :blockquote
68
+ map_element 'h1', to: :h1
69
+ map_element 'h2', to: :h2
70
+ map_element 'h3', to: :h3
71
+ map_element 'h4', to: :h4
72
+ map_element 'h5', to: :h5
73
+ map_element 'h6', to: :h6
74
+ map_element 'p', to: :p
73
75
  end
74
76
  end
75
77
  end
@@ -1,16 +1,18 @@
1
- require "lutaml/model"
1
+ # frozen_string_literal: true
2
2
 
3
- require_relative "list_item_type"
3
+ require 'lutaml/model'
4
+
5
+ require_relative 'list_item_type'
4
6
 
5
7
  module Metaschema
6
8
  class ListType < Lutaml::Model::Serializable
7
9
  attribute :li, ListItemType, collection: true
8
10
 
9
11
  xml do
10
- root "listType"
11
- namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"
12
+ root 'listType'
13
+ namespace 'http://csrc.nist.gov/ns/oscal/metaschema/1.0'
12
14
 
13
- map_element "li", to: :li
15
+ map_element 'li', to: :li
14
16
  end
15
17
  end
16
18
  end
@@ -1,10 +1,12 @@
1
- require "lutaml/model"
1
+ # frozen_string_literal: true
2
2
 
3
- require_relative "anchor_type"
4
- require_relative "code_type"
5
- require_relative "image_type"
6
- require_relative "inline_markup_type"
7
- require_relative "insert_type"
3
+ require 'lutaml/model'
4
+
5
+ require_relative 'anchor_type'
6
+ require_relative 'code_type'
7
+ require_relative 'image_type'
8
+ require_relative 'inline_markup_type'
9
+ require_relative 'insert_type'
8
10
 
9
11
  module Metaschema
10
12
  class MarkupLineDatatype < Lutaml::Model::Serializable
@@ -23,22 +25,22 @@ module Metaschema
23
25
  attribute :img, ImageType, collection: true
24
26
 
25
27
  xml do
26
- root "MarkupLineDatatype"
27
- namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"
28
+ root 'MarkupLineDatatype', mixed: true
29
+ namespace 'http://csrc.nist.gov/ns/oscal/metaschema/1.0'
28
30
 
29
31
  map_content to: :content
30
- map_element "a", to: :a
31
- map_element "insert", to: :insert
32
- map_element "br", to: :br
33
- map_element "code", to: :code
34
- map_element "em", to: :em
35
- map_element "i", to: :i
36
- map_element "b", to: :b
37
- map_element "strong", to: :strong
38
- map_element "sub", to: :sub
39
- map_element "sup", to: :sup
40
- map_element "q", to: :q
41
- map_element "img", to: :img
32
+ map_element 'a', to: :a
33
+ map_element 'insert', to: :insert
34
+ map_element 'br', to: :br
35
+ map_element 'code', to: :code
36
+ map_element 'em', to: :em
37
+ map_element 'i', to: :i
38
+ map_element 'b', to: :b
39
+ map_element 'strong', to: :strong
40
+ map_element 'sub', to: :sub
41
+ map_element 'sup', to: :sup
42
+ map_element 'q', to: :q
43
+ map_element 'img', to: :img
42
44
  end
43
45
  end
44
46
  end
@@ -1,13 +1,15 @@
1
- require "lutaml/model"
1
+ # frozen_string_literal: true
2
2
 
3
- require_relative "markup_line_datatype"
4
- require_relative "property_type"
5
- require_relative "remarks_type"
3
+ require 'lutaml/model'
4
+
5
+ require_relative 'markup_line_datatype'
6
+ require_relative 'property_type'
7
+ require_relative 'remarks_type'
6
8
 
7
9
  module Metaschema
8
10
  class MatchesConstraintType < Lutaml::Model::Serializable
9
11
  attribute :id, :string
10
- attribute :level, :string, default: -> { "ERROR" }
12
+ attribute :level, :string, default: -> { 'ERROR' }
11
13
  attribute :regex, :string
12
14
  attribute :datatype, :string
13
15
  attribute :formal_name, :string
@@ -16,17 +18,17 @@ module Metaschema
16
18
  attribute :remarks, RemarksType
17
19
 
18
20
  xml do
19
- root "MatchesConstraintType"
20
- namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"
21
+ root 'MatchesConstraintType'
22
+ namespace 'http://csrc.nist.gov/ns/oscal/metaschema/1.0'
21
23
 
22
- map_attribute "id", to: :id
23
- map_attribute "level", to: :level
24
- map_attribute "regex", to: :regex
25
- map_attribute "datatype", to: :datatype
26
- map_element "formal-name", to: :formal_name
27
- map_element "description", to: :description
28
- map_element "prop", to: :prop
29
- map_element "remarks", to: :remarks
24
+ map_attribute 'id', to: :id
25
+ map_attribute 'level', to: :level
26
+ map_attribute 'regex', to: :regex
27
+ map_attribute 'datatype', to: :datatype
28
+ map_element 'formal-name', to: :formal_name
29
+ map_element 'description', to: :description
30
+ map_element 'prop', to: :prop
31
+ map_element 'remarks', to: :remarks
30
32
  end
31
33
  end
32
34
  end
@@ -1,14 +1,16 @@
1
- require "lutaml/model"
1
+ # frozen_string_literal: true
2
+
3
+ require 'lutaml/model'
2
4
 
3
5
  module Metaschema
4
6
  class MetaschemaImportType < Lutaml::Model::Serializable
5
7
  attribute :href, :string
6
8
 
7
9
  xml do
8
- root "MetaschemaImportType"
9
- namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"
10
+ root 'MetaschemaImportType'
11
+ namespace 'http://csrc.nist.gov/ns/oscal/metaschema/1.0'
10
12
 
11
- map_attribute "href", to: :href
13
+ map_attribute 'href', to: :href
12
14
  end
13
15
  end
14
16
  end