lutaml-model 0.7.1 → 0.7.7

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 (259) hide show
  1. checksums.yaml +4 -4
  2. data/.envrc +1 -0
  3. data/.github/workflows/dependent-tests.yml +4 -0
  4. data/.github/workflows/rake.yml +12 -0
  5. data/.github/workflows/release.yml +3 -0
  6. data/.gitignore +6 -1
  7. data/.irbrc +1 -0
  8. data/.pryrc +1 -0
  9. data/.rubocop.yml +1 -1
  10. data/.rubocop_todo.yml +58 -84
  11. data/Gemfile +4 -1
  12. data/README.adoc +3115 -365
  13. data/RELEASE_NOTES.adoc +346 -0
  14. data/docs/custom_adapters.adoc +144 -0
  15. data/docs/custom_registers.adoc +228 -0
  16. data/docs/schema_generation.adoc +898 -0
  17. data/docs/schema_import.adoc +364 -0
  18. data/flake.lock +114 -0
  19. data/flake.nix +103 -0
  20. data/lib/lutaml/model/attribute.rb +242 -100
  21. data/lib/lutaml/model/choice.rb +30 -0
  22. data/lib/lutaml/model/collection.rb +212 -0
  23. data/lib/lutaml/model/comparable_model.rb +3 -3
  24. data/lib/lutaml/model/config.rb +71 -42
  25. data/lib/lutaml/model/constants.rb +2 -0
  26. data/lib/lutaml/model/error/element_count_out_of_range_error.rb +29 -0
  27. data/lib/lutaml/model/error/invalid_attribute_name_error.rb +15 -0
  28. data/lib/lutaml/model/error/invalid_attribute_options_error.rb +16 -0
  29. data/lib/lutaml/model/error/invalid_choice_range_error.rb +3 -5
  30. data/lib/lutaml/model/error/polymorphic_error.rb +7 -2
  31. data/lib/lutaml/model/error/register/not_registrable_class_error.rb +11 -0
  32. data/lib/lutaml/model/error/type/invalid_value_error.rb +5 -3
  33. data/lib/lutaml/model/error/type/max_bound_error.rb +20 -0
  34. data/lib/lutaml/model/error/type/max_length_error.rb +20 -0
  35. data/lib/lutaml/model/error/type/min_bound_error.rb +20 -0
  36. data/lib/lutaml/model/error/type/min_length_error.rb +20 -0
  37. data/lib/lutaml/model/error/type/pattern_not_matched_error.rb +18 -0
  38. data/lib/lutaml/model/error/validation_failed_error.rb +9 -0
  39. data/lib/lutaml/model/error.rb +10 -0
  40. data/lib/lutaml/model/errors.rb +36 -0
  41. data/lib/lutaml/model/format_registry.rb +44 -0
  42. data/lib/lutaml/model/global_register.rb +41 -0
  43. data/lib/lutaml/model/hash_adapter/document.rb +11 -0
  44. data/lib/lutaml/model/hash_adapter/mapping.rb +19 -0
  45. data/lib/lutaml/model/hash_adapter/mapping_rule.rb +9 -0
  46. data/lib/lutaml/model/hash_adapter/standard_adapter.rb +17 -0
  47. data/lib/lutaml/model/hash_adapter/transform.rb +8 -0
  48. data/lib/lutaml/model/hash_adapter.rb +21 -0
  49. data/lib/lutaml/model/json/document.rb +11 -0
  50. data/lib/lutaml/model/json/mapping.rb +19 -0
  51. data/lib/lutaml/model/json/mapping_rule.rb +9 -0
  52. data/lib/lutaml/model/{json_adapter → json}/multi_json_adapter.rb +4 -5
  53. data/lib/lutaml/model/{json_adapter/standard_json_adapter.rb → json/standard_adapter.rb} +5 -3
  54. data/lib/lutaml/model/json/transform.rb +8 -0
  55. data/lib/lutaml/model/json.rb +21 -0
  56. data/lib/lutaml/model/jsonl/document.rb +14 -0
  57. data/lib/lutaml/model/jsonl/mapping.rb +19 -0
  58. data/lib/lutaml/model/jsonl/mapping_rule.rb +9 -0
  59. data/lib/lutaml/model/jsonl/standard_adapter.rb +33 -0
  60. data/lib/lutaml/model/jsonl/transform.rb +19 -0
  61. data/lib/lutaml/model/jsonl.rb +21 -0
  62. data/lib/lutaml/model/key_value_document.rb +28 -0
  63. data/lib/lutaml/model/mapping/key_value_mapping.rb +85 -13
  64. data/lib/lutaml/model/mapping/key_value_mapping_rule.rb +5 -0
  65. data/lib/lutaml/model/mapping/mapping.rb +13 -0
  66. data/lib/lutaml/model/mapping/mapping_rule.rb +15 -9
  67. data/lib/lutaml/model/register.rb +105 -0
  68. data/lib/lutaml/model/{toml_adapter.rb → registrable.rb} +1 -1
  69. data/lib/lutaml/model/schema/base_schema.rb +64 -0
  70. data/lib/lutaml/model/schema/decorators/attribute.rb +114 -0
  71. data/lib/lutaml/model/schema/decorators/choices.rb +31 -0
  72. data/lib/lutaml/model/schema/decorators/class_definition.rb +85 -0
  73. data/lib/lutaml/model/schema/decorators/definition_collection.rb +97 -0
  74. data/lib/lutaml/model/schema/generator/definition.rb +53 -0
  75. data/lib/lutaml/model/schema/generator/definitions_collection.rb +81 -0
  76. data/lib/lutaml/model/schema/generator/properties_collection.rb +63 -0
  77. data/lib/lutaml/model/schema/generator/property.rb +110 -0
  78. data/lib/lutaml/model/schema/generator/ref.rb +24 -0
  79. data/lib/lutaml/model/schema/helpers/template_helper.rb +49 -0
  80. data/lib/lutaml/model/schema/json_schema.rb +42 -49
  81. data/lib/lutaml/model/schema/relaxng_schema.rb +14 -10
  82. data/lib/lutaml/model/schema/renderer.rb +36 -0
  83. data/lib/lutaml/model/schema/shared_methods.rb +24 -0
  84. data/lib/lutaml/model/schema/templates/model.erb +9 -0
  85. data/lib/lutaml/model/schema/xml_compiler/attribute.rb +85 -0
  86. data/lib/lutaml/model/schema/xml_compiler/attribute_group.rb +45 -0
  87. data/lib/lutaml/model/schema/xml_compiler/choice.rb +65 -0
  88. data/lib/lutaml/model/schema/xml_compiler/complex_content.rb +27 -0
  89. data/lib/lutaml/model/schema/xml_compiler/complex_content_restriction.rb +34 -0
  90. data/lib/lutaml/model/schema/xml_compiler/complex_type.rb +136 -0
  91. data/lib/lutaml/model/schema/xml_compiler/element.rb +104 -0
  92. data/lib/lutaml/model/schema/xml_compiler/group.rb +97 -0
  93. data/lib/lutaml/model/schema/xml_compiler/restriction.rb +101 -0
  94. data/lib/lutaml/model/schema/xml_compiler/sequence.rb +50 -0
  95. data/lib/lutaml/model/schema/xml_compiler/simple_content.rb +36 -0
  96. data/lib/lutaml/model/schema/xml_compiler/simple_type.rb +189 -0
  97. data/lib/lutaml/model/schema/xml_compiler.rb +231 -587
  98. data/lib/lutaml/model/schema/xsd_schema.rb +12 -8
  99. data/lib/lutaml/model/schema/yaml_schema.rb +41 -35
  100. data/lib/lutaml/model/schema.rb +1 -0
  101. data/lib/lutaml/model/sequence.rb +60 -30
  102. data/lib/lutaml/model/serialization_adapter.rb +22 -0
  103. data/lib/lutaml/model/serialize.rb +296 -548
  104. data/lib/lutaml/model/services/base.rb +11 -0
  105. data/lib/lutaml/model/services/logger.rb +54 -0
  106. data/lib/lutaml/model/services/rule_value_extractor.rb +92 -0
  107. data/lib/lutaml/model/services/transformer.rb +48 -0
  108. data/lib/lutaml/model/services/type/validator/number.rb +25 -0
  109. data/lib/lutaml/model/services/type/validator/string.rb +52 -0
  110. data/lib/lutaml/model/services/type/validator.rb +43 -0
  111. data/lib/lutaml/model/services/validator.rb +145 -0
  112. data/lib/lutaml/model/services.rb +5 -0
  113. data/lib/lutaml/model/toml/document.rb +11 -0
  114. data/lib/lutaml/model/toml/mapping.rb +27 -0
  115. data/lib/lutaml/model/toml/mapping_rule.rb +9 -0
  116. data/lib/lutaml/model/{toml_adapter → toml}/toml_rb_adapter.rb +3 -3
  117. data/lib/lutaml/model/toml/tomlib_adapter.rb +19 -0
  118. data/lib/lutaml/model/toml/transform.rb +8 -0
  119. data/lib/lutaml/model/toml.rb +30 -0
  120. data/lib/lutaml/model/transform/key_value_transform.rb +297 -0
  121. data/lib/lutaml/model/transform/xml_transform.rb +228 -0
  122. data/lib/lutaml/model/transform.rb +93 -0
  123. data/lib/lutaml/model/type/boolean.rb +1 -1
  124. data/lib/lutaml/model/type/date.rb +1 -1
  125. data/lib/lutaml/model/type/date_time.rb +1 -1
  126. data/lib/lutaml/model/type/decimal.rb +11 -9
  127. data/lib/lutaml/model/type/float.rb +2 -1
  128. data/lib/lutaml/model/type/integer.rb +24 -21
  129. data/lib/lutaml/model/type/string.rb +4 -2
  130. data/lib/lutaml/model/type/time.rb +1 -1
  131. data/lib/lutaml/model/type/time_without_date.rb +1 -1
  132. data/lib/lutaml/model/type/value.rb +11 -10
  133. data/lib/lutaml/model/type.rb +5 -2
  134. data/lib/lutaml/model/uninitialized_class.rb +1 -1
  135. data/lib/lutaml/model/utils.rb +56 -4
  136. data/lib/lutaml/model/validation.rb +6 -4
  137. data/lib/lutaml/model/version.rb +1 -1
  138. data/lib/lutaml/model/{xml_adapter → xml}/builder/nokogiri.rb +2 -2
  139. data/lib/lutaml/model/{xml_adapter → xml}/builder/oga.rb +10 -10
  140. data/lib/lutaml/model/{xml_adapter → xml}/builder/ox.rb +1 -1
  141. data/lib/lutaml/model/{xml_adapter/xml_document.rb → xml/document.rb} +42 -25
  142. data/lib/lutaml/model/xml/element.rb +32 -0
  143. data/lib/lutaml/model/xml/mapping.rb +471 -0
  144. data/lib/lutaml/model/xml/mapping_rule.rb +149 -0
  145. data/lib/lutaml/model/xml/nokogiri_adapter.rb +234 -0
  146. data/lib/lutaml/model/{xml_adapter → xml}/oga/document.rb +1 -1
  147. data/lib/lutaml/model/{xml_adapter → xml}/oga/element.rb +7 -2
  148. data/lib/lutaml/model/xml/oga_adapter.rb +172 -0
  149. data/lib/lutaml/model/xml/ox_adapter.rb +229 -0
  150. data/lib/lutaml/model/xml/transform.rb +8 -0
  151. data/lib/lutaml/model/{xml_adapter → xml}/xml_attribute.rb +1 -1
  152. data/lib/lutaml/model/{xml_adapter → xml}/xml_element.rb +9 -31
  153. data/lib/lutaml/model/{xml_adapter → xml}/xml_namespace.rb +1 -1
  154. data/lib/lutaml/model/xml.rb +31 -0
  155. data/lib/lutaml/model/xml_adapter/element.rb +11 -25
  156. data/lib/lutaml/model/xml_adapter/nokogiri_adapter.rb +6 -223
  157. data/lib/lutaml/model/xml_adapter/oga_adapter.rb +13 -163
  158. data/lib/lutaml/model/xml_adapter/ox_adapter.rb +10 -207
  159. data/lib/lutaml/model/yaml/document.rb +10 -0
  160. data/lib/lutaml/model/yaml/mapping.rb +19 -0
  161. data/lib/lutaml/model/yaml/mapping_rule.rb +9 -0
  162. data/lib/lutaml/model/{yaml_adapter/standard_yaml_adapter.rb → yaml/standard_adapter.rb} +4 -3
  163. data/lib/lutaml/model/yaml/transform.rb +8 -0
  164. data/lib/lutaml/model/yaml.rb +21 -0
  165. data/lib/lutaml/model/yamls/document.rb +14 -0
  166. data/lib/lutaml/model/yamls/mapping.rb +19 -0
  167. data/lib/lutaml/model/yamls/mapping_rule.rb +9 -0
  168. data/lib/lutaml/model/yamls/standard_adapter.rb +34 -0
  169. data/lib/lutaml/model/yamls/transform.rb +19 -0
  170. data/lib/lutaml/model/yamls.rb +21 -0
  171. data/lib/lutaml/model.rb +15 -4
  172. data/lutaml-model.gemspec +0 -4
  173. data/spec/benchmarks/xml_parsing_benchmark_spec.rb +5 -6
  174. data/spec/fixtures/xml/advanced_test_schema.xsd +134 -0
  175. data/spec/fixtures/xml/examples/nested_categories.xml +55 -0
  176. data/spec/fixtures/xml/examples/valid_catalog.xml +43 -0
  177. data/spec/fixtures/xml/product_catalog.xsd +151 -0
  178. data/spec/fixtures/xml/specifications_schema.xsd +38 -0
  179. data/spec/lutaml/model/attribute_collection_spec.rb +101 -0
  180. data/spec/lutaml/model/attribute_spec.rb +41 -44
  181. data/spec/lutaml/model/cdata_spec.rb +7 -7
  182. data/spec/lutaml/model/choice_spec.rb +44 -0
  183. data/spec/lutaml/model/custom_bibtex_adapter_spec.rb +598 -0
  184. data/spec/lutaml/model/custom_collection_spec.rb +830 -0
  185. data/spec/lutaml/model/custom_vobject_adapter_spec.rb +1226 -0
  186. data/spec/lutaml/model/global_register_spec.rb +108 -0
  187. data/spec/lutaml/model/group_spec.rb +27 -10
  188. data/spec/lutaml/model/hash/adapter_spec.rb +255 -0
  189. data/spec/lutaml/model/json_adapter_spec.rb +6 -6
  190. data/spec/lutaml/model/jsonl/standard_adapter_spec.rb +91 -0
  191. data/spec/lutaml/model/jsonl_spec.rb +229 -0
  192. data/spec/lutaml/model/key_value_mapping_spec.rb +25 -1
  193. data/spec/lutaml/model/mixed_content_spec.rb +24 -24
  194. data/spec/lutaml/model/multiple_mapping_spec.rb +6 -6
  195. data/spec/lutaml/model/ordered_content_spec.rb +6 -6
  196. data/spec/lutaml/model/polymorphic_spec.rb +178 -0
  197. data/spec/lutaml/model/register/key_value_spec.rb +275 -0
  198. data/spec/lutaml/model/register/xml_spec.rb +185 -0
  199. data/spec/lutaml/model/register_spec.rb +147 -0
  200. data/spec/lutaml/model/root_mappings_spec.rb +3 -3
  201. data/spec/lutaml/model/rule_value_extractor_spec.rb +162 -0
  202. data/spec/lutaml/model/schema/generator/definitions_collection_spec.rb +120 -0
  203. data/spec/lutaml/model/schema/json_schema_spec.rb +412 -51
  204. data/spec/lutaml/model/schema/json_schema_to_models_spec.rb +383 -0
  205. data/spec/lutaml/model/schema/xml_compiler/attribute_group_spec.rb +65 -0
  206. data/spec/lutaml/model/schema/xml_compiler/attribute_spec.rb +63 -0
  207. data/spec/lutaml/model/schema/xml_compiler/choice_spec.rb +71 -0
  208. data/spec/lutaml/model/schema/xml_compiler/complex_content_restriction_spec.rb +55 -0
  209. data/spec/lutaml/model/schema/xml_compiler/complex_content_spec.rb +37 -0
  210. data/spec/lutaml/model/schema/xml_compiler/complex_type_spec.rb +173 -0
  211. data/spec/lutaml/model/schema/xml_compiler/element_spec.rb +63 -0
  212. data/spec/lutaml/model/schema/xml_compiler/group_spec.rb +86 -0
  213. data/spec/lutaml/model/schema/xml_compiler/restriction_spec.rb +76 -0
  214. data/spec/lutaml/model/schema/xml_compiler/sequence_spec.rb +59 -0
  215. data/spec/lutaml/model/schema/xml_compiler/simple_content_spec.rb +55 -0
  216. data/spec/lutaml/model/schema/xml_compiler/simple_type_spec.rb +181 -0
  217. data/spec/lutaml/model/schema/xml_compiler_spec.rb +503 -1804
  218. data/spec/lutaml/model/schema/yaml_schema_spec.rb +249 -26
  219. data/spec/lutaml/model/sequence_spec.rb +36 -0
  220. data/spec/lutaml/model/serializable_spec.rb +201 -94
  221. data/spec/lutaml/model/toml_adapter_spec.rb +6 -6
  222. data/spec/lutaml/model/toml_spec.rb +51 -0
  223. data/spec/lutaml/model/transformation_spec.rb +72 -15
  224. data/spec/lutaml/model/type_spec.rb +8 -4
  225. data/spec/lutaml/model/uninitialized_class_spec.rb +96 -0
  226. data/spec/lutaml/model/utils_spec.rb +3 -3
  227. data/spec/lutaml/model/xml/derived_attributes_spec.rb +1 -1
  228. data/spec/lutaml/model/xml/namespace_spec.rb +57 -0
  229. data/spec/lutaml/model/xml/root_mappings/nested_child_mappings_spec.rb +217 -0
  230. data/spec/lutaml/model/xml/xml_element_spec.rb +7 -1
  231. data/spec/lutaml/model/xml_adapter/nokogiri_adapter_spec.rb +2 -2
  232. data/spec/lutaml/model/xml_adapter/oga_adapter_spec.rb +2 -2
  233. data/spec/lutaml/model/xml_adapter/ox_adapter_spec.rb +2 -2
  234. data/spec/lutaml/model/xml_adapter/xml_namespace_spec.rb +12 -12
  235. data/spec/lutaml/model/xml_adapter_spec.rb +30 -6
  236. data/spec/lutaml/model/xml_mapping_rule_spec.rb +14 -7
  237. data/spec/lutaml/model/xml_mapping_spec.rb +27 -15
  238. data/spec/lutaml/model/xml_spec.rb +63 -0
  239. data/spec/lutaml/model/yaml_adapter_spec.rb +3 -5
  240. data/spec/lutaml/model/yamls/standard_adapter_spec.rb +183 -0
  241. data/spec/lutaml/model/yamls_spec.rb +294 -0
  242. data/spec/spec_helper.rb +4 -3
  243. metadata +162 -60
  244. data/lib/lutaml/model/json_adapter/json_document.rb +0 -20
  245. data/lib/lutaml/model/json_adapter/json_object.rb +0 -28
  246. data/lib/lutaml/model/loggable.rb +0 -15
  247. data/lib/lutaml/model/mapping/json_mapping.rb +0 -17
  248. data/lib/lutaml/model/mapping/toml_mapping.rb +0 -25
  249. data/lib/lutaml/model/mapping/xml_mapping.rb +0 -389
  250. data/lib/lutaml/model/mapping/xml_mapping_rule.rb +0 -139
  251. data/lib/lutaml/model/mapping/yaml_mapping.rb +0 -17
  252. data/lib/lutaml/model/mapping.rb +0 -14
  253. data/lib/lutaml/model/schema/templates/simple_type.rb +0 -247
  254. data/lib/lutaml/model/toml_adapter/toml_document.rb +0 -20
  255. data/lib/lutaml/model/toml_adapter/toml_object.rb +0 -28
  256. data/lib/lutaml/model/toml_adapter/tomlib_adapter.rb +0 -20
  257. data/lib/lutaml/model/yaml_adapter/yaml_document.rb +0 -20
  258. data/lib/lutaml/model/yaml_adapter/yaml_object.rb +0 -28
  259. data/lib/lutaml/model/yaml_adapter.rb +0 -8
@@ -0,0 +1,294 @@
1
+ require "spec_helper"
2
+
3
+ module YamlsSpec
4
+ class Address < Lutaml::Model::Serializable
5
+ attribute :city, :string
6
+
7
+ yaml do
8
+ map "city", to: :city
9
+ end
10
+ end
11
+
12
+ class Person < Lutaml::Model::Serializable
13
+ attribute :name, :string
14
+ attribute :age, :integer
15
+ attribute :address, Address
16
+
17
+ yaml do
18
+ map "full_name", to: :name
19
+ map "age", to: :age
20
+ map "address", to: :address
21
+ end
22
+ end
23
+
24
+ class Directory < Lutaml::Model::Collection
25
+ instances :persons, Person
26
+
27
+ yamls do
28
+ map_instances to: :persons
29
+ end
30
+ end
31
+ end
32
+
33
+ RSpec.describe "Yamls" do
34
+ let(:john) do
35
+ YamlsSpec::Person.new(
36
+ {
37
+ name: "John",
38
+ age: "30",
39
+ address: YamlsSpec::Address.new({ city: "New York" }),
40
+ },
41
+ )
42
+ end
43
+
44
+ let(:jane) do
45
+ YamlsSpec::Person.new(
46
+ {
47
+ name: "Jane",
48
+ age: "25",
49
+ address: YamlsSpec::Address.new({ city: "London" }),
50
+ },
51
+ )
52
+ end
53
+
54
+ let(:bob) do
55
+ YamlsSpec::Person.new(
56
+ {
57
+ name: "Bob",
58
+ age: "35",
59
+ address: YamlsSpec::Address.new({ city: "Paris" }),
60
+ },
61
+ )
62
+ end
63
+
64
+ let(:valid_yamls) do
65
+ <<~YAMLS.strip
66
+ ---
67
+ full_name: John
68
+ age: 30
69
+ address:
70
+ city: New York
71
+ ---
72
+ full_name: Jane
73
+ age: 25
74
+ address:
75
+ city: London
76
+ ---
77
+ full_name: Bob
78
+ age: 35
79
+ address:
80
+ city: Paris
81
+ YAMLS
82
+ end
83
+
84
+ let(:valid_yamls_with_empty_docs) do
85
+ <<~YAMLS
86
+ ---
87
+ full_name: John
88
+ age: 30
89
+ address:
90
+ city: New York
91
+ ---
92
+
93
+ ---
94
+ full_name: Jane
95
+ age: 25
96
+ address:
97
+ city: London
98
+ ---
99
+
100
+
101
+ ---
102
+ full_name: Bob
103
+ age: 35
104
+ address:
105
+ city: Paris
106
+ ---
107
+
108
+
109
+ YAMLS
110
+ end
111
+
112
+ let(:invalid_yamls_content) do
113
+ <<~YAMLS
114
+ ---
115
+ full_name: John
116
+ age: 30
117
+ address:
118
+ city: New York
119
+ ---
120
+ invalid yaml: [
121
+ ---
122
+ full_name: Bob
123
+ age: 35
124
+ address:
125
+ city: Paris
126
+ YAMLS
127
+ end
128
+
129
+ let(:parsed) { YamlsSpec::Directory.from_yamls(valid_yamls) }
130
+
131
+ it "parses all the yaml documents" do
132
+ expect(parsed.persons).to eq([john, jane, bob])
133
+ end
134
+
135
+ it "handles empty documents" do
136
+ expect(
137
+ YamlsSpec::Directory.from_yamls(valid_yamls_with_empty_docs).persons,
138
+ ).to eq([john, jane, bob])
139
+ end
140
+
141
+ it "round trips valid yamls correctly" do
142
+ expect(parsed.to_yamls).to eq(valid_yamls)
143
+ end
144
+
145
+ it "removes empty documents when round triping valid yamls" do
146
+ expect(
147
+ YamlsSpec::Directory.from_yamls(valid_yamls_with_empty_docs).to_yamls,
148
+ ).to eq(valid_yamls)
149
+ end
150
+
151
+ it "skips invalid documents and show warning" do
152
+ expect do
153
+ YamlsSpec::Directory.from_yamls(invalid_yamls_content)
154
+ end.to output(/Skipping invalid yaml: /).to_stderr
155
+ end
156
+
157
+ describe "parsing" do
158
+ it "handles empty documents" do
159
+ yamls_with_empty_docs = <<~YAMLS
160
+ ---
161
+ full_name: John
162
+ age: 30
163
+ address:
164
+ city: New York
165
+ ---
166
+
167
+ ---
168
+ full_name: Jane
169
+ age: 25
170
+ address:
171
+ city: London
172
+ YAMLS
173
+ result = YamlsSpec::Directory.from_yamls(yamls_with_empty_docs)
174
+ expect(result.persons).to be_an(Array)
175
+ expect(result.persons.length).to eq(2)
176
+ end
177
+ end
178
+
179
+ describe "roundtrip" do
180
+ it "maintains data integrity with special characters" do
181
+ special_chars_yamls = <<~YAMLS
182
+ ---
183
+ full_name: John Doe
184
+ age: 30
185
+ address:
186
+ city: New York
187
+ ---
188
+ full_name: Jane "Smith"
189
+ age: 25
190
+ address:
191
+ city: London
192
+ YAMLS
193
+
194
+ # Parse the original YAMLS
195
+ directory = YamlsSpec::Directory.from_yamls(special_chars_yamls)
196
+
197
+ # Serialize back to YAMLS
198
+ serialized = directory.to_yamls
199
+
200
+ # Parse the serialized data again
201
+ roundtrip_directory = YamlsSpec::Directory.from_yamls(serialized)
202
+
203
+ # Compare the results
204
+ expect(roundtrip_directory.persons.length).to eq(directory.persons.length)
205
+ roundtrip_directory.persons.each_with_index do |person, index|
206
+ original = directory.persons[index]
207
+ expect(person.name).to eq(original.name)
208
+ expect(person.age).to eq(original.age)
209
+ expect(person.address.city).to eq(original.address.city)
210
+ end
211
+ end
212
+ end
213
+
214
+ describe "format conversion" do
215
+ let(:valid_yamls_content) do
216
+ <<~YAMLS.strip
217
+ ---
218
+ full_name: John
219
+ age: 30
220
+ address:
221
+ city: New York
222
+ ---
223
+ full_name: Jane
224
+ age: 25
225
+ address:
226
+ city: London
227
+ ---
228
+ full_name: Bob
229
+ age: 35
230
+ address:
231
+ city: Paris
232
+ YAMLS
233
+ end
234
+
235
+ it "converts between YAMLS and YAML" do
236
+ # Parse YAMLS to Directory
237
+ directory = YamlsSpec::Directory.from_yamls(valid_yamls_content)
238
+
239
+ # Convert to YAML
240
+ yaml_string = directory.to_yaml
241
+
242
+ # Parse YAML back to Directory
243
+ yaml_directory = YamlsSpec::Directory.from_yaml(yaml_string)
244
+
245
+ # Convert back to YAMLS
246
+ yamls_output = yaml_directory.to_yamls
247
+
248
+ # Final parse to verify
249
+ final_directory = YamlsSpec::Directory.from_yamls(yamls_output)
250
+
251
+ # Compare the results
252
+ expect(final_directory.persons.length).to eq(directory.persons.length)
253
+ final_directory.persons.each_with_index do |person, index|
254
+ original = directory.persons[index]
255
+ expect(person.name).to eq(original.name)
256
+ expect(person.age).to eq(original.age)
257
+ expect(person.address.city).to eq(original.address.city)
258
+ end
259
+ end
260
+
261
+ it "handles collections of objects" do
262
+ # Create a directory with people
263
+ directory = YamlsSpec::Directory.new(
264
+ [
265
+ YamlsSpec::Person.new(
266
+ name: "John",
267
+ age: 30,
268
+ address: YamlsSpec::Address.new(city: "New York"),
269
+ ),
270
+ YamlsSpec::Person.new(
271
+ name: "Jane",
272
+ age: 25,
273
+ address: YamlsSpec::Address.new(city: "London"),
274
+ ),
275
+ ],
276
+ )
277
+
278
+ # Convert to YAMLS
279
+ yamls_output = directory.to_yamls
280
+
281
+ # Parse back to verify
282
+ parsed_directory = YamlsSpec::Directory.from_yamls(yamls_output)
283
+
284
+ # Compare the results
285
+ expect(parsed_directory.persons.length).to eq(directory.persons.length)
286
+ parsed_directory.persons.each_with_index do |person, index|
287
+ original = directory.persons[index]
288
+ expect(person.name).to eq(original.name)
289
+ expect(person.age).to eq(original.age)
290
+ expect(person.address.city).to eq(original.address.city)
291
+ end
292
+ end
293
+ end
294
+ end
data/spec/spec_helper.rb CHANGED
@@ -22,12 +22,13 @@ end
22
22
 
23
23
  # configuration example
24
24
  require_relative "../lib/lutaml/model"
25
- require_relative "../lib/lutaml/model/xml_adapter/nokogiri_adapter"
26
- require_relative "../lib/lutaml/model/xml_adapter/ox_adapter"
27
- require_relative "../lib/lutaml/model/toml_adapter/toml_rb_adapter"
25
+ # require_relative "../lib/lutaml/model/xml/nokogiri_adapter"
26
+ # require_relative "../lib/lutaml/model/xml/ox_adapter"
27
+ # require_relative "../lib/lutaml/model/toml_adapter/toml_rb_adapter"
28
28
 
29
29
  Lutaml::Model::Config.configure do |config|
30
30
  config.xml_adapter_type = :nokogiri
31
+ config.hash_adapter_type = :standard_hash
31
32
  config.json_adapter_type = :standard_json
32
33
  config.yaml_adapter_type = :standard_yaml
33
34
  config.toml_adapter_type = :toml_rb
metadata CHANGED
@@ -1,43 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lutaml-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-03-19 00:00:00.000000000 Z
11
+ date: 2025-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: base64
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: liquid
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '5'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '5'
41
13
  - !ruby/object:Gem::Dependency
42
14
  name: moxml
43
15
  requirement: !ruby/object:Gem::Requirement
@@ -76,12 +48,15 @@ executables:
76
48
  extensions: []
77
49
  extra_rdoc_files: []
78
50
  files:
51
+ - ".envrc"
79
52
  - ".github/workflows/dependent-repos-todo.json"
80
53
  - ".github/workflows/dependent-repos.json"
81
54
  - ".github/workflows/dependent-tests.yml"
82
55
  - ".github/workflows/rake.yml"
83
56
  - ".github/workflows/release.yml"
84
57
  - ".gitignore"
58
+ - ".irbrc"
59
+ - ".pryrc"
85
60
  - ".rspec"
86
61
  - ".rubocop.yml"
87
62
  - ".rubocop_todo.yml"
@@ -89,14 +64,22 @@ files:
89
64
  - Gemfile
90
65
  - LICENSE.md
91
66
  - README.adoc
67
+ - RELEASE_NOTES.adoc
92
68
  - Rakefile
93
69
  - bin/console
94
70
  - bin/setup
71
+ - docs/custom_adapters.adoc
72
+ - docs/custom_registers.adoc
73
+ - docs/schema_generation.adoc
74
+ - docs/schema_import.adoc
95
75
  - exe/lutaml-model
76
+ - flake.lock
77
+ - flake.nix
96
78
  - lib/lutaml/model.rb
97
79
  - lib/lutaml/model/attribute.rb
98
80
  - lib/lutaml/model/choice.rb
99
81
  - lib/lutaml/model/cli.rb
82
+ - lib/lutaml/model/collection.rb
100
83
  - lib/lutaml/model/comparable_model.rb
101
84
  - lib/lutaml/model/comparable_nil.rb
102
85
  - lib/lutaml/model/comparison.rb
@@ -107,9 +90,12 @@ files:
107
90
  - lib/lutaml/model/error/choice_upper_bound_error.rb
108
91
  - lib/lutaml/model/error/collection_count_out_of_range_error.rb
109
92
  - lib/lutaml/model/error/collection_true_missing_error.rb
93
+ - lib/lutaml/model/error/element_count_out_of_range_error.rb
110
94
  - lib/lutaml/model/error/import_model_with_root_error.rb
111
95
  - lib/lutaml/model/error/incorrect_mapping_argument_error.rb
112
96
  - lib/lutaml/model/error/incorrect_sequence_error.rb
97
+ - lib/lutaml/model/error/invalid_attribute_name_error.rb
98
+ - lib/lutaml/model/error/invalid_attribute_options_error.rb
113
99
  - lib/lutaml/model/error/invalid_choice_range_error.rb
114
100
  - lib/lutaml/model/error/invalid_value_error.rb
115
101
  - lib/lutaml/model/error/liquid_not_enabled_error.rb
@@ -118,47 +104,109 @@ files:
118
104
  - lib/lutaml/model/error/no_root_namespace_error.rb
119
105
  - lib/lutaml/model/error/pattern_not_matched_error.rb
120
106
  - lib/lutaml/model/error/polymorphic_error.rb
107
+ - lib/lutaml/model/error/register/not_registrable_class_error.rb
121
108
  - lib/lutaml/model/error/type/invalid_value_error.rb
109
+ - lib/lutaml/model/error/type/max_bound_error.rb
110
+ - lib/lutaml/model/error/type/max_length_error.rb
111
+ - lib/lutaml/model/error/type/min_bound_error.rb
112
+ - lib/lutaml/model/error/type/min_length_error.rb
113
+ - lib/lutaml/model/error/type/pattern_not_matched_error.rb
122
114
  - lib/lutaml/model/error/type_error.rb
123
115
  - lib/lutaml/model/error/type_not_enabled_error.rb
124
116
  - lib/lutaml/model/error/unknown_adapter_type_error.rb
125
117
  - lib/lutaml/model/error/unknown_sequence_mapping_error.rb
126
118
  - lib/lutaml/model/error/unknown_type_error.rb
127
119
  - lib/lutaml/model/error/validation_error.rb
120
+ - lib/lutaml/model/error/validation_failed_error.rb
121
+ - lib/lutaml/model/errors.rb
122
+ - lib/lutaml/model/format_registry.rb
123
+ - lib/lutaml/model/global_register.rb
124
+ - lib/lutaml/model/hash_adapter.rb
125
+ - lib/lutaml/model/hash_adapter/document.rb
126
+ - lib/lutaml/model/hash_adapter/mapping.rb
127
+ - lib/lutaml/model/hash_adapter/mapping_rule.rb
128
+ - lib/lutaml/model/hash_adapter/standard_adapter.rb
129
+ - lib/lutaml/model/hash_adapter/transform.rb
130
+ - lib/lutaml/model/json.rb
131
+ - lib/lutaml/model/json/document.rb
132
+ - lib/lutaml/model/json/mapping.rb
133
+ - lib/lutaml/model/json/mapping_rule.rb
134
+ - lib/lutaml/model/json/multi_json_adapter.rb
135
+ - lib/lutaml/model/json/standard_adapter.rb
136
+ - lib/lutaml/model/json/transform.rb
128
137
  - lib/lutaml/model/json_adapter.rb
129
- - lib/lutaml/model/json_adapter/json_document.rb
130
- - lib/lutaml/model/json_adapter/json_object.rb
131
- - lib/lutaml/model/json_adapter/multi_json_adapter.rb
132
- - lib/lutaml/model/json_adapter/standard_json_adapter.rb
138
+ - lib/lutaml/model/jsonl.rb
139
+ - lib/lutaml/model/jsonl/document.rb
140
+ - lib/lutaml/model/jsonl/mapping.rb
141
+ - lib/lutaml/model/jsonl/mapping_rule.rb
142
+ - lib/lutaml/model/jsonl/standard_adapter.rb
143
+ - lib/lutaml/model/jsonl/transform.rb
144
+ - lib/lutaml/model/key_value_document.rb
133
145
  - lib/lutaml/model/liquefiable.rb
134
- - lib/lutaml/model/loggable.rb
135
- - lib/lutaml/model/mapping.rb
136
- - lib/lutaml/model/mapping/json_mapping.rb
137
146
  - lib/lutaml/model/mapping/key_value_mapping.rb
138
147
  - lib/lutaml/model/mapping/key_value_mapping_rule.rb
148
+ - lib/lutaml/model/mapping/mapping.rb
139
149
  - lib/lutaml/model/mapping/mapping_rule.rb
140
- - lib/lutaml/model/mapping/toml_mapping.rb
141
- - lib/lutaml/model/mapping/xml_mapping.rb
142
- - lib/lutaml/model/mapping/xml_mapping_rule.rb
143
- - lib/lutaml/model/mapping/yaml_mapping.rb
144
150
  - lib/lutaml/model/mapping_hash.rb
151
+ - lib/lutaml/model/register.rb
152
+ - lib/lutaml/model/registrable.rb
145
153
  - lib/lutaml/model/schema.rb
154
+ - lib/lutaml/model/schema/base_schema.rb
155
+ - lib/lutaml/model/schema/decorators/attribute.rb
156
+ - lib/lutaml/model/schema/decorators/choices.rb
157
+ - lib/lutaml/model/schema/decorators/class_definition.rb
158
+ - lib/lutaml/model/schema/decorators/definition_collection.rb
159
+ - lib/lutaml/model/schema/generator/definition.rb
160
+ - lib/lutaml/model/schema/generator/definitions_collection.rb
161
+ - lib/lutaml/model/schema/generator/properties_collection.rb
162
+ - lib/lutaml/model/schema/generator/property.rb
163
+ - lib/lutaml/model/schema/generator/ref.rb
164
+ - lib/lutaml/model/schema/helpers/template_helper.rb
146
165
  - lib/lutaml/model/schema/json_schema.rb
147
166
  - lib/lutaml/model/schema/json_schema_parser.rb
148
167
  - lib/lutaml/model/schema/relaxng_schema.rb
149
- - lib/lutaml/model/schema/templates/simple_type.rb
168
+ - lib/lutaml/model/schema/renderer.rb
169
+ - lib/lutaml/model/schema/shared_methods.rb
170
+ - lib/lutaml/model/schema/templates/model.erb
150
171
  - lib/lutaml/model/schema/xml_compiler.rb
172
+ - lib/lutaml/model/schema/xml_compiler/attribute.rb
173
+ - lib/lutaml/model/schema/xml_compiler/attribute_group.rb
174
+ - lib/lutaml/model/schema/xml_compiler/choice.rb
175
+ - lib/lutaml/model/schema/xml_compiler/complex_content.rb
176
+ - lib/lutaml/model/schema/xml_compiler/complex_content_restriction.rb
177
+ - lib/lutaml/model/schema/xml_compiler/complex_type.rb
178
+ - lib/lutaml/model/schema/xml_compiler/element.rb
179
+ - lib/lutaml/model/schema/xml_compiler/group.rb
180
+ - lib/lutaml/model/schema/xml_compiler/restriction.rb
181
+ - lib/lutaml/model/schema/xml_compiler/sequence.rb
182
+ - lib/lutaml/model/schema/xml_compiler/simple_content.rb
183
+ - lib/lutaml/model/schema/xml_compiler/simple_type.rb
151
184
  - lib/lutaml/model/schema/xsd_schema.rb
152
185
  - lib/lutaml/model/schema/yaml_schema.rb
153
186
  - lib/lutaml/model/schema_location.rb
154
187
  - lib/lutaml/model/sequence.rb
155
188
  - lib/lutaml/model/serializable.rb
189
+ - lib/lutaml/model/serialization_adapter.rb
156
190
  - lib/lutaml/model/serialize.rb
157
- - lib/lutaml/model/toml_adapter.rb
158
- - lib/lutaml/model/toml_adapter/toml_document.rb
159
- - lib/lutaml/model/toml_adapter/toml_object.rb
160
- - lib/lutaml/model/toml_adapter/toml_rb_adapter.rb
161
- - lib/lutaml/model/toml_adapter/tomlib_adapter.rb
191
+ - lib/lutaml/model/services.rb
192
+ - lib/lutaml/model/services/base.rb
193
+ - lib/lutaml/model/services/logger.rb
194
+ - lib/lutaml/model/services/rule_value_extractor.rb
195
+ - lib/lutaml/model/services/transformer.rb
196
+ - lib/lutaml/model/services/type/validator.rb
197
+ - lib/lutaml/model/services/type/validator/number.rb
198
+ - lib/lutaml/model/services/type/validator/string.rb
199
+ - lib/lutaml/model/services/validator.rb
200
+ - lib/lutaml/model/toml.rb
201
+ - lib/lutaml/model/toml/document.rb
202
+ - lib/lutaml/model/toml/mapping.rb
203
+ - lib/lutaml/model/toml/mapping_rule.rb
204
+ - lib/lutaml/model/toml/toml_rb_adapter.rb
205
+ - lib/lutaml/model/toml/tomlib_adapter.rb
206
+ - lib/lutaml/model/toml/transform.rb
207
+ - lib/lutaml/model/transform.rb
208
+ - lib/lutaml/model/transform/key_value_transform.rb
209
+ - lib/lutaml/model/transform/xml_transform.rb
162
210
  - lib/lutaml/model/type.rb
163
211
  - lib/lutaml/model/type/boolean.rb
164
212
  - lib/lutaml/model/type/date.rb
@@ -175,24 +223,40 @@ files:
175
223
  - lib/lutaml/model/utils.rb
176
224
  - lib/lutaml/model/validation.rb
177
225
  - lib/lutaml/model/version.rb
226
+ - lib/lutaml/model/xml.rb
227
+ - lib/lutaml/model/xml/builder/nokogiri.rb
228
+ - lib/lutaml/model/xml/builder/oga.rb
229
+ - lib/lutaml/model/xml/builder/ox.rb
230
+ - lib/lutaml/model/xml/document.rb
231
+ - lib/lutaml/model/xml/element.rb
232
+ - lib/lutaml/model/xml/mapping.rb
233
+ - lib/lutaml/model/xml/mapping_rule.rb
234
+ - lib/lutaml/model/xml/nokogiri_adapter.rb
235
+ - lib/lutaml/model/xml/oga/document.rb
236
+ - lib/lutaml/model/xml/oga/element.rb
237
+ - lib/lutaml/model/xml/oga_adapter.rb
238
+ - lib/lutaml/model/xml/ox_adapter.rb
239
+ - lib/lutaml/model/xml/transform.rb
240
+ - lib/lutaml/model/xml/xml_attribute.rb
241
+ - lib/lutaml/model/xml/xml_element.rb
242
+ - lib/lutaml/model/xml/xml_namespace.rb
178
243
  - lib/lutaml/model/xml_adapter.rb
179
- - lib/lutaml/model/xml_adapter/builder/nokogiri.rb
180
- - lib/lutaml/model/xml_adapter/builder/oga.rb
181
- - lib/lutaml/model/xml_adapter/builder/ox.rb
182
244
  - lib/lutaml/model/xml_adapter/element.rb
183
245
  - lib/lutaml/model/xml_adapter/nokogiri_adapter.rb
184
- - lib/lutaml/model/xml_adapter/oga/document.rb
185
- - lib/lutaml/model/xml_adapter/oga/element.rb
186
246
  - lib/lutaml/model/xml_adapter/oga_adapter.rb
187
247
  - lib/lutaml/model/xml_adapter/ox_adapter.rb
188
- - lib/lutaml/model/xml_adapter/xml_attribute.rb
189
- - lib/lutaml/model/xml_adapter/xml_document.rb
190
- - lib/lutaml/model/xml_adapter/xml_element.rb
191
- - lib/lutaml/model/xml_adapter/xml_namespace.rb
192
- - lib/lutaml/model/yaml_adapter.rb
193
- - lib/lutaml/model/yaml_adapter/standard_yaml_adapter.rb
194
- - lib/lutaml/model/yaml_adapter/yaml_document.rb
195
- - lib/lutaml/model/yaml_adapter/yaml_object.rb
248
+ - lib/lutaml/model/yaml.rb
249
+ - lib/lutaml/model/yaml/document.rb
250
+ - lib/lutaml/model/yaml/mapping.rb
251
+ - lib/lutaml/model/yaml/mapping_rule.rb
252
+ - lib/lutaml/model/yaml/standard_adapter.rb
253
+ - lib/lutaml/model/yaml/transform.rb
254
+ - lib/lutaml/model/yamls.rb
255
+ - lib/lutaml/model/yamls/document.rb
256
+ - lib/lutaml/model/yamls/mapping.rb
257
+ - lib/lutaml/model/yamls/mapping_rule.rb
258
+ - lib/lutaml/model/yamls/standard_adapter.rb
259
+ - lib/lutaml/model/yamls/transform.rb
196
260
  - lutaml-model.gemspec
197
261
  - sig/lutaml/model.rbs
198
262
  - spec/address_spec.rb
@@ -207,28 +271,41 @@ files:
207
271
  - spec/fixtures/sample_model.rb
208
272
  - spec/fixtures/vase.rb
209
273
  - spec/fixtures/xml/address_example_260.xsd
274
+ - spec/fixtures/xml/advanced_test_schema.xsd
275
+ - spec/fixtures/xml/examples/nested_categories.xml
276
+ - spec/fixtures/xml/examples/valid_catalog.xml
210
277
  - spec/fixtures/xml/invalid_math_document.xml
211
278
  - spec/fixtures/xml/latin_encoding.xml
212
279
  - spec/fixtures/xml/math_document_schema.xsd
280
+ - spec/fixtures/xml/product_catalog.xsd
213
281
  - spec/fixtures/xml/shift_jis.xml
214
282
  - spec/fixtures/xml/special_char.xml
283
+ - spec/fixtures/xml/specifications_schema.xsd
215
284
  - spec/fixtures/xml/test_schema.xsd
216
285
  - spec/fixtures/xml/user.xsd
217
286
  - spec/fixtures/xml/valid_math_document.xml
287
+ - spec/lutaml/model/attribute_collection_spec.rb
218
288
  - spec/lutaml/model/attribute_spec.rb
219
289
  - spec/lutaml/model/cdata_spec.rb
220
290
  - spec/lutaml/model/choice_spec.rb
221
291
  - spec/lutaml/model/collection_spec.rb
222
292
  - spec/lutaml/model/comparable_model_spec.rb
293
+ - spec/lutaml/model/custom_bibtex_adapter_spec.rb
294
+ - spec/lutaml/model/custom_collection_spec.rb
223
295
  - spec/lutaml/model/custom_model_spec.rb
224
296
  - spec/lutaml/model/custom_serialization_spec.rb
297
+ - spec/lutaml/model/custom_vobject_adapter_spec.rb
225
298
  - spec/lutaml/model/defaults_spec.rb
226
299
  - spec/lutaml/model/delegation_spec.rb
227
300
  - spec/lutaml/model/enum_spec.rb
301
+ - spec/lutaml/model/global_register_spec.rb
228
302
  - spec/lutaml/model/group_spec.rb
303
+ - spec/lutaml/model/hash/adapter_spec.rb
229
304
  - spec/lutaml/model/included_spec.rb
230
305
  - spec/lutaml/model/inheritance_spec.rb
231
306
  - spec/lutaml/model/json_adapter_spec.rb
307
+ - spec/lutaml/model/jsonl/standard_adapter_spec.rb
308
+ - spec/lutaml/model/jsonl_spec.rb
232
309
  - spec/lutaml/model/key_value_mapping_spec.rb
233
310
  - spec/lutaml/model/liquefiable_spec.rb
234
311
  - spec/lutaml/model/map_all_spec.rb
@@ -238,11 +315,29 @@ files:
238
315
  - spec/lutaml/model/namespace_spec.rb
239
316
  - spec/lutaml/model/ordered_content_spec.rb
240
317
  - spec/lutaml/model/polymorphic_spec.rb
318
+ - spec/lutaml/model/register/key_value_spec.rb
319
+ - spec/lutaml/model/register/xml_spec.rb
320
+ - spec/lutaml/model/register_spec.rb
241
321
  - spec/lutaml/model/render_empty_spec.rb
242
322
  - spec/lutaml/model/render_nil_spec.rb
243
323
  - spec/lutaml/model/root_mappings_spec.rb
324
+ - spec/lutaml/model/rule_value_extractor_spec.rb
325
+ - spec/lutaml/model/schema/generator/definitions_collection_spec.rb
244
326
  - spec/lutaml/model/schema/json_schema_spec.rb
327
+ - spec/lutaml/model/schema/json_schema_to_models_spec.rb
245
328
  - spec/lutaml/model/schema/relaxng_schema_spec.rb
329
+ - spec/lutaml/model/schema/xml_compiler/attribute_group_spec.rb
330
+ - spec/lutaml/model/schema/xml_compiler/attribute_spec.rb
331
+ - spec/lutaml/model/schema/xml_compiler/choice_spec.rb
332
+ - spec/lutaml/model/schema/xml_compiler/complex_content_restriction_spec.rb
333
+ - spec/lutaml/model/schema/xml_compiler/complex_content_spec.rb
334
+ - spec/lutaml/model/schema/xml_compiler/complex_type_spec.rb
335
+ - spec/lutaml/model/schema/xml_compiler/element_spec.rb
336
+ - spec/lutaml/model/schema/xml_compiler/group_spec.rb
337
+ - spec/lutaml/model/schema/xml_compiler/restriction_spec.rb
338
+ - spec/lutaml/model/schema/xml_compiler/sequence_spec.rb
339
+ - spec/lutaml/model/schema/xml_compiler/simple_content_spec.rb
340
+ - spec/lutaml/model/schema/xml_compiler/simple_type_spec.rb
246
341
  - spec/lutaml/model/schema/xml_compiler_spec.rb
247
342
  - spec/lutaml/model/schema/xsd_schema_spec.rb
248
343
  - spec/lutaml/model/schema/yaml_schema_spec.rb
@@ -251,6 +346,7 @@ files:
251
346
  - spec/lutaml/model/serializable_validation_spec.rb
252
347
  - spec/lutaml/model/simple_model_spec.rb
253
348
  - spec/lutaml/model/toml_adapter_spec.rb
349
+ - spec/lutaml/model/toml_spec.rb
254
350
  - spec/lutaml/model/transformation_spec.rb
255
351
  - spec/lutaml/model/type/boolean_spec.rb
256
352
  - spec/lutaml/model/type/date_spec.rb
@@ -263,12 +359,15 @@ files:
263
359
  - spec/lutaml/model/type/time_spec.rb
264
360
  - spec/lutaml/model/type/time_without_date_spec.rb
265
361
  - spec/lutaml/model/type_spec.rb
362
+ - spec/lutaml/model/uninitialized_class_spec.rb
266
363
  - spec/lutaml/model/utils_spec.rb
267
364
  - spec/lutaml/model/validation_spec.rb
268
365
  - spec/lutaml/model/value_map_spec.rb
269
366
  - spec/lutaml/model/with_child_mapping_spec.rb
270
367
  - spec/lutaml/model/xml/derived_attributes_spec.rb
271
368
  - spec/lutaml/model/xml/namespace/nested_with_explicit_namespace_spec.rb
369
+ - spec/lutaml/model/xml/namespace_spec.rb
370
+ - spec/lutaml/model/xml/root_mappings/nested_child_mappings_spec.rb
272
371
  - spec/lutaml/model/xml/xml_element_spec.rb
273
372
  - spec/lutaml/model/xml_adapter/nokogiri_adapter_spec.rb
274
373
  - spec/lutaml/model/xml_adapter/oga_adapter_spec.rb
@@ -277,7 +376,10 @@ files:
277
376
  - spec/lutaml/model/xml_adapter_spec.rb
278
377
  - spec/lutaml/model/xml_mapping_rule_spec.rb
279
378
  - spec/lutaml/model/xml_mapping_spec.rb
379
+ - spec/lutaml/model/xml_spec.rb
280
380
  - spec/lutaml/model/yaml_adapter_spec.rb
381
+ - spec/lutaml/model/yamls/standard_adapter_spec.rb
382
+ - spec/lutaml/model/yamls_spec.rb
281
383
  - spec/lutaml/model_spec.rb
282
384
  - spec/person_spec.rb
283
385
  - spec/sample_model_spec.rb