lutaml-model 0.8.3 → 0.8.4
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.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +23 -23
- data/README.adoc +213 -1
- data/docs/_guides/document-validation.adoc +303 -0
- data/docs/_guides/index.adoc +1 -0
- data/docs/_guides/xml-mapping.adoc +9 -1
- data/docs/_guides/xml_mappings/07_best_practices.adoc +36 -0
- data/docs/_guides/xml_mappings/08_troubleshooting.adoc +89 -0
- data/docs/_tutorials/lutaml-xml-architecture.adoc +6 -1
- data/lib/lutaml/model/attribute.rb +19 -1
- data/lib/lutaml/model/error/liquid_drop_already_registered_error.rb +11 -0
- data/lib/lutaml/model/error/ordered_content_mapping_error.rb +17 -0
- data/lib/lutaml/model/global_context.rb +1 -0
- data/lib/lutaml/model/liquefiable.rb +12 -15
- data/lib/lutaml/model/mapping/mapping_rule.rb +10 -2
- data/lib/lutaml/model/mapping_hash.rb +1 -1
- data/lib/lutaml/model/services/transformer.rb +67 -32
- data/lib/lutaml/model/transform.rb +41 -4
- data/lib/lutaml/model/uninitialized_class.rb +11 -5
- data/lib/lutaml/model/validation/concerns/has_issues.rb +27 -0
- data/lib/lutaml/model/validation/context.rb +36 -0
- data/lib/lutaml/model/validation/issue.rb +62 -0
- data/lib/lutaml/model/validation/layer_result.rb +34 -0
- data/lib/lutaml/model/validation/profile.rb +66 -0
- data/lib/lutaml/model/validation/registry.rb +60 -0
- data/lib/lutaml/model/validation/remediation.rb +33 -0
- data/lib/lutaml/model/validation/remediation_result.rb +20 -0
- data/lib/lutaml/model/validation/report.rb +39 -0
- data/lib/lutaml/model/validation/rule.rb +59 -0
- data/lib/lutaml/model/validation.rb +2 -1
- data/lib/lutaml/model/validation_framework.rb +77 -0
- data/lib/lutaml/model/version.rb +1 -1
- data/lib/lutaml/model.rb +4 -0
- data/lib/lutaml/xml/adapter/nokogiri_adapter.rb +9 -2
- data/lib/lutaml/xml/adapter/oga_adapter.rb +11 -3
- data/lib/lutaml/xml/adapter/ox_adapter.rb +5 -2
- data/lib/lutaml/xml/adapter/rexml_adapter.rb +10 -3
- data/lib/lutaml/xml/adapter_element.rb +26 -2
- data/lib/lutaml/xml/data_model.rb +14 -0
- data/lib/lutaml/xml/document.rb +3 -0
- data/lib/lutaml/xml/element.rb +8 -2
- data/lib/lutaml/xml/mapping.rb +9 -0
- data/lib/lutaml/xml/model_transform.rb +42 -0
- data/lib/lutaml/xml/schema/xsd/base.rb +4 -1
- data/lib/lutaml/xml/serialization/instance_methods.rb +3 -1
- data/lib/lutaml/xml/transformation/ordered_applier.rb +46 -2
- data/lib/lutaml/xml/transformation.rb +40 -1
- data/lib/lutaml/xml/xml_element.rb +8 -7
- data/lutaml-model.gemspec +1 -1
- data/spec/lutaml/model/attribute_default_cache_spec.rb +58 -0
- data/spec/lutaml/model/liquefiable_spec.rb +22 -6
- data/spec/lutaml/model/liquid_compatibility_spec.rb +442 -0
- data/spec/lutaml/model/ordered_content_spec.rb +5 -5
- data/spec/lutaml/model/services/transformer_spec.rb +43 -0
- data/spec/lutaml/model/transform_cache_spec.rb +62 -0
- data/spec/lutaml/model/transform_dynamic_attributes_spec.rb +41 -0
- data/spec/lutaml/model/uninitialized_class_deep_dup_spec.rb +39 -0
- data/spec/lutaml/model/uninitialized_class_spec.rb +14 -2
- data/spec/lutaml/model/validation/concerns/has_issues_spec.rb +76 -0
- data/spec/lutaml/model/validation/context_spec.rb +60 -0
- data/spec/lutaml/model/validation/issue_spec.rb +77 -0
- data/spec/lutaml/model/validation/layer_result_spec.rb +66 -0
- data/spec/lutaml/model/validation/profile_spec.rb +134 -0
- data/spec/lutaml/model/validation/registry_spec.rb +94 -0
- data/spec/lutaml/model/validation/remediation_result_spec.rb +23 -0
- data/spec/lutaml/model/validation/remediation_spec.rb +72 -0
- data/spec/lutaml/model/validation/report_spec.rb +58 -0
- data/spec/lutaml/model/validation/rule_spec.rb +134 -0
- data/spec/lutaml/model/validation/uninitialized_class_validate_spec.rb +29 -0
- data/spec/lutaml/model/validation/validation_error_spec.rb +29 -0
- data/spec/lutaml/model/validation/validation_framework_spec.rb +110 -0
- data/spec/lutaml/xml/content_model_validation_spec.rb +157 -0
- data/spec/lutaml/xml/mapping_spec.rb +12 -7
- metadata +46 -7
- data/spec/fixtures/liquid_templates/_ceramics.liquid +0 -3
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lutaml-model
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-05-
|
|
11
|
+
date: 2026-05-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: base64
|
|
@@ -70,16 +70,22 @@ dependencies:
|
|
|
70
70
|
name: liquid
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- - "
|
|
73
|
+
- - ">="
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '4.0'
|
|
76
|
+
- - "<"
|
|
74
77
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: '
|
|
78
|
+
version: '6.0'
|
|
76
79
|
type: :runtime
|
|
77
80
|
prerelease: false
|
|
78
81
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
82
|
requirements:
|
|
80
|
-
- - "
|
|
83
|
+
- - ">="
|
|
84
|
+
- !ruby/object:Gem::Version
|
|
85
|
+
version: '4.0'
|
|
86
|
+
- - "<"
|
|
81
87
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: '
|
|
88
|
+
version: '6.0'
|
|
83
89
|
- !ruby/object:Gem::Dependency
|
|
84
90
|
name: moxml
|
|
85
91
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -190,6 +196,7 @@ files:
|
|
|
190
196
|
- docs/_guides/character-encoding.adoc
|
|
191
197
|
- docs/_guides/collection-serialization.adoc
|
|
192
198
|
- docs/_guides/creating-xsd.adoc
|
|
199
|
+
- docs/_guides/document-validation.adoc
|
|
193
200
|
- docs/_guides/index.adoc
|
|
194
201
|
- docs/_guides/keyvalue-serialization.adoc
|
|
195
202
|
- docs/_guides/liquid-templates.adoc
|
|
@@ -405,6 +412,7 @@ files:
|
|
|
405
412
|
- lib/lutaml/model/error/invalid_format_error.rb
|
|
406
413
|
- lib/lutaml/model/error/invalid_value_error.rb
|
|
407
414
|
- lib/lutaml/model/error/liquid_class_not_found_error.rb
|
|
415
|
+
- lib/lutaml/model/error/liquid_drop_already_registered_error.rb
|
|
408
416
|
- lib/lutaml/model/error/liquid_not_enabled_error.rb
|
|
409
417
|
- lib/lutaml/model/error/mapping_already_exists_error.rb
|
|
410
418
|
- lib/lutaml/model/error/mapping_attribute_missing_error.rb
|
|
@@ -415,6 +423,7 @@ files:
|
|
|
415
423
|
- lib/lutaml/model/error/no_mapping_found_error.rb
|
|
416
424
|
- lib/lutaml/model/error/no_root_mapping_error.rb
|
|
417
425
|
- lib/lutaml/model/error/no_root_namespace_error.rb
|
|
426
|
+
- lib/lutaml/model/error/ordered_content_mapping_error.rb
|
|
418
427
|
- lib/lutaml/model/error/pattern_not_matched_error.rb
|
|
419
428
|
- lib/lutaml/model/error/polymorphic_error.rb
|
|
420
429
|
- lib/lutaml/model/error/register/not_registrable_class_error.rb
|
|
@@ -565,6 +574,17 @@ files:
|
|
|
565
574
|
- lib/lutaml/model/uninitialized_class.rb
|
|
566
575
|
- lib/lutaml/model/utils.rb
|
|
567
576
|
- lib/lutaml/model/validation.rb
|
|
577
|
+
- lib/lutaml/model/validation/concerns/has_issues.rb
|
|
578
|
+
- lib/lutaml/model/validation/context.rb
|
|
579
|
+
- lib/lutaml/model/validation/issue.rb
|
|
580
|
+
- lib/lutaml/model/validation/layer_result.rb
|
|
581
|
+
- lib/lutaml/model/validation/profile.rb
|
|
582
|
+
- lib/lutaml/model/validation/registry.rb
|
|
583
|
+
- lib/lutaml/model/validation/remediation.rb
|
|
584
|
+
- lib/lutaml/model/validation/remediation_result.rb
|
|
585
|
+
- lib/lutaml/model/validation/report.rb
|
|
586
|
+
- lib/lutaml/model/validation/rule.rb
|
|
587
|
+
- lib/lutaml/model/validation_framework.rb
|
|
568
588
|
- lib/lutaml/model/value_transformer.rb
|
|
569
589
|
- lib/lutaml/model/version.rb
|
|
570
590
|
- lib/lutaml/model/yaml.rb
|
|
@@ -821,7 +841,6 @@ files:
|
|
|
821
841
|
- spec/fixtures/geolexica_v2_sample.yaml
|
|
822
842
|
- spec/fixtures/geolexica_v2_sample2.yaml
|
|
823
843
|
- spec/fixtures/liquid_templates/_ceramic.liquid
|
|
824
|
-
- spec/fixtures/liquid_templates/_ceramics.liquid
|
|
825
844
|
- spec/fixtures/liquid_templates/_ceramics_in_one.liquid
|
|
826
845
|
- spec/fixtures/person.rb
|
|
827
846
|
- spec/fixtures/sample_model.rb
|
|
@@ -1499,6 +1518,7 @@ files:
|
|
|
1499
1518
|
- spec/lutaml/key_value/transformation/value_serializer_spec.rb
|
|
1500
1519
|
- spec/lutaml/key_value/transformation_spec.rb
|
|
1501
1520
|
- spec/lutaml/model/attribute_collection_spec.rb
|
|
1521
|
+
- spec/lutaml/model/attribute_default_cache_spec.rb
|
|
1502
1522
|
- spec/lutaml/model/attribute_form_default_spec.rb
|
|
1503
1523
|
- spec/lutaml/model/attribute_spec.rb
|
|
1504
1524
|
- spec/lutaml/model/cached_type_resolver_spec.rb
|
|
@@ -1542,6 +1562,7 @@ files:
|
|
|
1542
1562
|
- spec/lutaml/model/key_value_mapping_spec.rb
|
|
1543
1563
|
- spec/lutaml/model/lazy_collection_spec.rb
|
|
1544
1564
|
- spec/lutaml/model/liquefiable_spec.rb
|
|
1565
|
+
- spec/lutaml/model/liquid_compatibility_spec.rb
|
|
1545
1566
|
- spec/lutaml/model/logger_spec.rb
|
|
1546
1567
|
- spec/lutaml/model/map_all_spec.rb
|
|
1547
1568
|
- spec/lutaml/model/map_content_spec.rb
|
|
@@ -1573,9 +1594,12 @@ files:
|
|
|
1573
1594
|
- spec/lutaml/model/serializable_validation_spec.rb
|
|
1574
1595
|
- spec/lutaml/model/serialize_perf_guard_spec.rb
|
|
1575
1596
|
- spec/lutaml/model/services/default_value_resolver_spec.rb
|
|
1597
|
+
- spec/lutaml/model/services/transformer_spec.rb
|
|
1576
1598
|
- spec/lutaml/model/simple_model_spec.rb
|
|
1577
1599
|
- spec/lutaml/model/toml_adapter_spec.rb
|
|
1578
1600
|
- spec/lutaml/model/toml_spec.rb
|
|
1601
|
+
- spec/lutaml/model/transform_cache_spec.rb
|
|
1602
|
+
- spec/lutaml/model/transform_dynamic_attributes_spec.rb
|
|
1579
1603
|
- spec/lutaml/model/transformation_builder_spec.rb
|
|
1580
1604
|
- spec/lutaml/model/transformation_spec.rb
|
|
1581
1605
|
- spec/lutaml/model/type/base64_binary_spec.rb
|
|
@@ -1603,8 +1627,22 @@ files:
|
|
|
1603
1627
|
- spec/lutaml/model/type_resolver_spec.rb
|
|
1604
1628
|
- spec/lutaml/model/type_spec.rb
|
|
1605
1629
|
- spec/lutaml/model/type_substitution_spec.rb
|
|
1630
|
+
- spec/lutaml/model/uninitialized_class_deep_dup_spec.rb
|
|
1606
1631
|
- spec/lutaml/model/uninitialized_class_spec.rb
|
|
1607
1632
|
- spec/lutaml/model/utils_spec.rb
|
|
1633
|
+
- spec/lutaml/model/validation/concerns/has_issues_spec.rb
|
|
1634
|
+
- spec/lutaml/model/validation/context_spec.rb
|
|
1635
|
+
- spec/lutaml/model/validation/issue_spec.rb
|
|
1636
|
+
- spec/lutaml/model/validation/layer_result_spec.rb
|
|
1637
|
+
- spec/lutaml/model/validation/profile_spec.rb
|
|
1638
|
+
- spec/lutaml/model/validation/registry_spec.rb
|
|
1639
|
+
- spec/lutaml/model/validation/remediation_result_spec.rb
|
|
1640
|
+
- spec/lutaml/model/validation/remediation_spec.rb
|
|
1641
|
+
- spec/lutaml/model/validation/report_spec.rb
|
|
1642
|
+
- spec/lutaml/model/validation/rule_spec.rb
|
|
1643
|
+
- spec/lutaml/model/validation/uninitialized_class_validate_spec.rb
|
|
1644
|
+
- spec/lutaml/model/validation/validation_error_spec.rb
|
|
1645
|
+
- spec/lutaml/model/validation/validation_framework_spec.rb
|
|
1608
1646
|
- spec/lutaml/model/validation_spec.rb
|
|
1609
1647
|
- spec/lutaml/model/value_map_spec.rb
|
|
1610
1648
|
- spec/lutaml/model/value_transformation_comprehensive_spec.rb
|
|
@@ -1629,6 +1667,7 @@ files:
|
|
|
1629
1667
|
- spec/lutaml/xml/compiled_rule_namespace_spec.rb
|
|
1630
1668
|
- spec/lutaml/xml/conformance/xml_namespaces_spec.rb
|
|
1631
1669
|
- spec/lutaml/xml/conformance/xml_schema_instance_spec.rb
|
|
1670
|
+
- spec/lutaml/xml/content_model_validation_spec.rb
|
|
1632
1671
|
- spec/lutaml/xml/data_model_spec.rb
|
|
1633
1672
|
- spec/lutaml/xml/decisions/decision_engine_spec.rb
|
|
1634
1673
|
- spec/lutaml/xml/decisions/decision_spec.rb
|