lutaml-model 0.8.18 → 0.8.22
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/.github/workflows/dependent-tests.yml +1 -1
- data/.github/workflows/rake.yml +1 -0
- data/.rubocop.yml +1 -1
- data/.rubocop_todo.yml +133 -72
- data/bench/bench_common.rb +8 -5
- data/bench/bench_niso.rb +1 -2
- data/bench/gate_config.rb +4 -1
- data/benchmark/serialization_benchmark.rb +4 -4
- data/docs/_guides/builder-dsl.adoc +127 -0
- data/docs/_guides/value-transformations.adoc +27 -0
- data/lib/compat/opal/generate_boot.rb +3 -1
- data/lib/compat/opal/lutaml_model_boot.rb +10 -7
- data/lib/compat/opal/moxml_boot.rb +6 -1
- data/lib/lutaml/hash_format/format.rb +29 -0
- data/lib/lutaml/hash_format.rb +5 -27
- data/lib/lutaml/json/format.rb +61 -0
- data/lib/lutaml/json.rb +4 -59
- data/lib/lutaml/jsonl/format.rb +22 -0
- data/lib/lutaml/jsonl.rb +5 -19
- data/lib/lutaml/key_value/format.rb +26 -0
- data/lib/lutaml/key_value/transform.rb +4 -1
- data/lib/lutaml/key_value/transformation/value_serializer.rb +0 -2
- data/lib/lutaml/key_value.rb +4 -21
- data/lib/lutaml/model/attribute.rb +38 -4
- data/lib/lutaml/model/collection.rb +2 -2
- data/lib/lutaml/model/compiled_rule.rb +1 -1
- data/lib/lutaml/model/config.rb +2 -2
- data/lib/lutaml/model/consolidation_map.rb +2 -2
- data/lib/lutaml/model/consolidation_rule/dispatch_block.rb +2 -2
- data/lib/lutaml/model/errors.rb +2 -2
- data/lib/lutaml/model/global_context.rb +4 -2
- data/lib/lutaml/model/mapping/mapping_rule.rb +4 -1
- data/lib/lutaml/model/mapping/model_mapping.rb +2 -2
- data/lib/lutaml/model/runtime_compatibility.rb +2 -2
- data/lib/lutaml/model/schema/class_loader.rb +2 -1
- data/lib/lutaml/model/schema/decorators/definition_collection.rb +4 -4
- data/lib/lutaml/model/schema/definitions/namespace.rb +2 -1
- data/lib/lutaml/model/schema/file_writer.rb +5 -2
- data/lib/lutaml/model/schema/renderers/base.rb +4 -3
- data/lib/lutaml/model/schema/renderers/mappings.rb +9 -3
- data/lib/lutaml/model/schema/renderers/member_decls.rb +9 -3
- data/lib/lutaml/model/schema/renderers/model.rb +18 -6
- data/lib/lutaml/model/schema/renderers/required_files_calculator.rb +2 -1
- data/lib/lutaml/model/schema/renderers.rb +2 -1
- data/lib/lutaml/model/schema/rnc_compiler/source_resolver.rb +6 -2
- data/lib/lutaml/model/schema/rnc_compiler.rb +3 -1
- data/lib/lutaml/model/schema/rng_compiler/element_visitor.rb +35 -15
- data/lib/lutaml/model/schema/rng_compiler/value_type_resolver.rb +4 -2
- data/lib/lutaml/model/schema/rng_compiler.rb +10 -5
- data/lib/lutaml/model/schema/xml_compiler/element_order.rb +2 -1
- data/lib/lutaml/model/schema/xml_compiler/spec_builder/complex_types.rb +4 -2
- data/lib/lutaml/model/schema/xml_compiler/spec_builder/members.rb +39 -13
- data/lib/lutaml/model/schema/xml_compiler/spec_builder.rb +29 -10
- data/lib/lutaml/model/schema/xml_compiler/supported_data_types.rb +2 -2
- data/lib/lutaml/model/schema/xml_compiler.rb +10 -5
- data/lib/lutaml/model/sequence.rb +4 -4
- data/lib/lutaml/model/serialize/attribute_definition.rb +10 -9
- data/lib/lutaml/model/serialize/builder.rb +55 -0
- data/lib/lutaml/model/serialize/format_conversion.rb +2 -2
- data/lib/lutaml/model/serialize/initialization.rb +12 -3
- data/lib/lutaml/model/serialize/model_import.rb +1 -0
- data/lib/lutaml/model/serialize.rb +4 -3
- data/lib/lutaml/model/type/uninitialized_class_guard.rb +1 -1
- data/lib/lutaml/model/type.rb +9 -0
- data/lib/lutaml/model/type_registry.rb +2 -2
- data/lib/lutaml/model/uninitialized_class.rb +1 -1
- data/lib/lutaml/model/union.rb +5 -2
- data/lib/lutaml/model/utils.rb +2 -2
- data/lib/lutaml/model/value_policy.rb +27 -0
- data/lib/lutaml/model/version.rb +1 -1
- data/lib/lutaml/model.rb +17 -16
- data/lib/lutaml/rdf/mapping.rb +2 -2
- data/lib/lutaml/rdf/namespace_set.rb +2 -2
- data/lib/lutaml/rdf/transform.rb +2 -2
- data/lib/lutaml/toml/format.rb +48 -0
- data/lib/lutaml/toml.rb +5 -46
- data/lib/lutaml/xml/adapter/base_adapter.rb +2 -2
- data/lib/lutaml/xml/builder/base.rb +2 -2
- data/lib/lutaml/xml/format.rb +331 -0
- data/lib/lutaml/xml/mapping.rb +2 -2
- data/lib/lutaml/xml/mapping_rule.rb +62 -3
- data/lib/lutaml/xml/model_transform.rb +132 -55
- data/lib/lutaml/xml/namespace_collector.rb +3 -3
- data/lib/lutaml/xml/parse_session.rb +59 -0
- data/lib/lutaml/xml/parsed_namespace_set.rb +2 -2
- data/lib/lutaml/xml/schema/builder.rb +5 -5
- data/lib/lutaml/xml/schema/xsd/schema_location_mapping.rb +2 -2
- data/lib/lutaml/xml/schema/xsd.rb +0 -2
- data/lib/lutaml/xml/schema/xsd_schema.rb +2 -1
- data/lib/lutaml/xml/serialization/format_conversion.rb +3 -3
- data/lib/lutaml/xml/transformation/element_builder.rb +2 -1
- data/lib/lutaml/xml/transformation/ordered_applier.rb +99 -4
- data/lib/lutaml/xml/xml_element.rb +2 -0
- data/lib/lutaml/xml.rb +4 -328
- data/lib/lutaml/yaml/format.rb +30 -0
- data/lib/lutaml/yaml.rb +5 -28
- data/lib/lutaml/yamls/adapter/mapping.rb +2 -2
- data/lib/lutaml/yamls/format.rb +22 -0
- data/lib/lutaml/yamls.rb +5 -19
- data/lib/tasks/benchmark_runner.rb +2 -2
- data/lutaml-model.gemspec +1 -1
- data/spec/lutaml/model/attribute_apply_value_map_spec.rb +26 -13
- data/spec/lutaml/model/attribute_spec.rb +8 -3
- data/spec/lutaml/model/custom_bibtex_adapter_spec.rb +2 -2
- data/spec/lutaml/model/custom_from_empty_values_spec.rb +74 -0
- data/spec/lutaml/model/custom_vobject_adapter_spec.rb +8 -8
- data/spec/lutaml/model/defaults_spec.rb +45 -0
- data/spec/lutaml/model/json_spec.rb +1 -2
- data/spec/lutaml/model/ordered_content_spec.rb +18 -7
- data/spec/lutaml/model/serialize/builder_spec.rb +361 -0
- data/spec/lutaml/model/store_spec.rb +3 -1
- data/spec/lutaml/model/transform_apply_value_map_spec.rb +6 -3
- data/spec/lutaml/model/union_attribute_spec.rb +4 -2
- data/spec/lutaml/model/value_policy_spec.rb +82 -0
- data/spec/lutaml/require_load_order_spec.rb +25 -0
- data/spec/lutaml/xml/attribute_element_namespace_disjoint_spec.rb +88 -0
- data/spec/lutaml/xml/attribute_namespace_disjointness_spec.rb +125 -0
- data/spec/lutaml/xml/out_of_namespace_parsing_spec.rb +123 -0
- data/spec/lutaml/xml/schema/rnc_compiler_spec.rb +17 -6
- data/spec/lutaml/xml/schema/rng_compiler_spec.rb +15 -6
- data/spec/lutaml/xml/w3c_types_spec.rb +3 -6
- metadata +22 -4
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.22
|
|
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-
|
|
11
|
+
date: 2026-08-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: base64
|
|
@@ -92,14 +92,14 @@ dependencies:
|
|
|
92
92
|
requirements:
|
|
93
93
|
- - "~>"
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: 0.
|
|
95
|
+
version: 0.5.0
|
|
96
96
|
type: :runtime
|
|
97
97
|
prerelease: false
|
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
|
99
99
|
requirements:
|
|
100
100
|
- - "~>"
|
|
101
101
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: 0.
|
|
102
|
+
version: 0.5.0
|
|
103
103
|
- !ruby/object:Gem::Dependency
|
|
104
104
|
name: ostruct
|
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -198,6 +198,7 @@ files:
|
|
|
198
198
|
- docs/PERFORMANCE_METHODOLOGY.md
|
|
199
199
|
- docs/_config.yml
|
|
200
200
|
- docs/_guides/advanced-mapping.adoc
|
|
201
|
+
- docs/_guides/builder-dsl.adoc
|
|
201
202
|
- docs/_guides/character-encoding.adoc
|
|
202
203
|
- docs/_guides/collection-serialization.adoc
|
|
203
204
|
- docs/_guides/creating-xsd.adoc
|
|
@@ -308,6 +309,7 @@ files:
|
|
|
308
309
|
- lib/lutaml/hash_format/adapter/mapping_rule.rb
|
|
309
310
|
- lib/lutaml/hash_format/adapter/standard_adapter.rb
|
|
310
311
|
- lib/lutaml/hash_format/adapter/transform.rb
|
|
312
|
+
- lib/lutaml/hash_format/format.rb
|
|
311
313
|
- lib/lutaml/hash_format/type/serializers.rb
|
|
312
314
|
- lib/lutaml/json.rb
|
|
313
315
|
- lib/lutaml/json/adapter.rb
|
|
@@ -318,6 +320,7 @@ files:
|
|
|
318
320
|
- lib/lutaml/json/adapter/oj_adapter.rb
|
|
319
321
|
- lib/lutaml/json/adapter/standard_adapter.rb
|
|
320
322
|
- lib/lutaml/json/adapter/transform.rb
|
|
323
|
+
- lib/lutaml/json/format.rb
|
|
321
324
|
- lib/lutaml/json/schema.rb
|
|
322
325
|
- lib/lutaml/json/schema/json_schema.rb
|
|
323
326
|
- lib/lutaml/json/type/serializers.rb
|
|
@@ -328,6 +331,7 @@ files:
|
|
|
328
331
|
- lib/lutaml/jsonl/adapter/mapping_rule.rb
|
|
329
332
|
- lib/lutaml/jsonl/adapter/standard_adapter.rb
|
|
330
333
|
- lib/lutaml/jsonl/adapter/transform.rb
|
|
334
|
+
- lib/lutaml/jsonl/format.rb
|
|
331
335
|
- lib/lutaml/jsonld.rb
|
|
332
336
|
- lib/lutaml/jsonld/adapter.rb
|
|
333
337
|
- lib/lutaml/key_value.rb
|
|
@@ -374,6 +378,7 @@ files:
|
|
|
374
378
|
- lib/lutaml/key_value/data_model.rb
|
|
375
379
|
- lib/lutaml/key_value/data_model/element.rb
|
|
376
380
|
- lib/lutaml/key_value/document.rb
|
|
381
|
+
- lib/lutaml/key_value/format.rb
|
|
377
382
|
- lib/lutaml/key_value/mapping.rb
|
|
378
383
|
- lib/lutaml/key_value/mapping_rule.rb
|
|
379
384
|
- lib/lutaml/key_value/transform.rb
|
|
@@ -641,6 +646,7 @@ files:
|
|
|
641
646
|
- lib/lutaml/model/validation/report.rb
|
|
642
647
|
- lib/lutaml/model/validation/rule.rb
|
|
643
648
|
- lib/lutaml/model/validation_framework.rb
|
|
649
|
+
- lib/lutaml/model/value_policy.rb
|
|
644
650
|
- lib/lutaml/model/value_transformer.rb
|
|
645
651
|
- lib/lutaml/model/version.rb
|
|
646
652
|
- lib/lutaml/model/yaml.rb
|
|
@@ -674,6 +680,7 @@ files:
|
|
|
674
680
|
- lib/lutaml/toml/adapter/toml_rb_adapter.rb
|
|
675
681
|
- lib/lutaml/toml/adapter/tomlib_adapter.rb
|
|
676
682
|
- lib/lutaml/toml/adapter/transform.rb
|
|
683
|
+
- lib/lutaml/toml/format.rb
|
|
677
684
|
- lib/lutaml/toml/type/serializers.rb
|
|
678
685
|
- lib/lutaml/turtle.rb
|
|
679
686
|
- lib/lutaml/turtle/adapter.rb
|
|
@@ -742,6 +749,7 @@ files:
|
|
|
742
749
|
- lib/lutaml/xml/error/schema_validation_error.rb
|
|
743
750
|
- lib/lutaml/xml/error/xml_configuration_error.rb
|
|
744
751
|
- lib/lutaml/xml/error/xml_error.rb
|
|
752
|
+
- lib/lutaml/xml/format.rb
|
|
745
753
|
- lib/lutaml/xml/format_chooser.rb
|
|
746
754
|
- lib/lutaml/xml/hoisting_algorithm.rb
|
|
747
755
|
- lib/lutaml/xml/listener.rb
|
|
@@ -768,6 +776,7 @@ files:
|
|
|
768
776
|
- lib/lutaml/xml/oga/element.rb
|
|
769
777
|
- lib/lutaml/xml/ox.rb
|
|
770
778
|
- lib/lutaml/xml/ox/element.rb
|
|
779
|
+
- lib/lutaml/xml/parse_session.rb
|
|
771
780
|
- lib/lutaml/xml/parsed_namespace_declaration.rb
|
|
772
781
|
- lib/lutaml/xml/parsed_namespace_set.rb
|
|
773
782
|
- lib/lutaml/xml/polymorphic_value_handler.rb
|
|
@@ -894,6 +903,7 @@ files:
|
|
|
894
903
|
- lib/lutaml/yaml/adapter/mapping_rule.rb
|
|
895
904
|
- lib/lutaml/yaml/adapter/standard_adapter.rb
|
|
896
905
|
- lib/lutaml/yaml/adapter/transform.rb
|
|
906
|
+
- lib/lutaml/yaml/format.rb
|
|
897
907
|
- lib/lutaml/yaml/schema.rb
|
|
898
908
|
- lib/lutaml/yaml/schema/yaml_schema.rb
|
|
899
909
|
- lib/lutaml/yaml/type/serializers.rb
|
|
@@ -908,6 +918,7 @@ files:
|
|
|
908
918
|
- lib/lutaml/yamls/adapter/transform.rb
|
|
909
919
|
- lib/lutaml/yamls/adapter/yamls_sequence.rb
|
|
910
920
|
- lib/lutaml/yamls/adapter/yamls_sequence_rule.rb
|
|
921
|
+
- lib/lutaml/yamls/format.rb
|
|
911
922
|
- lib/tasks/benchmark_runner.rb
|
|
912
923
|
- lib/tasks/memory_profile.rb
|
|
913
924
|
- lib/tasks/performance.rake
|
|
@@ -1653,6 +1664,7 @@ files:
|
|
|
1653
1664
|
- spec/lutaml/model/context_registry_spec.rb
|
|
1654
1665
|
- spec/lutaml/model/custom_bibtex_adapter_spec.rb
|
|
1655
1666
|
- spec/lutaml/model/custom_collection_spec.rb
|
|
1667
|
+
- spec/lutaml/model/custom_from_empty_values_spec.rb
|
|
1656
1668
|
- spec/lutaml/model/custom_model_spec.rb
|
|
1657
1669
|
- spec/lutaml/model/custom_serialization_spec.rb
|
|
1658
1670
|
- spec/lutaml/model/custom_vobject_adapter_spec.rb
|
|
@@ -1719,6 +1731,7 @@ files:
|
|
|
1719
1731
|
- spec/lutaml/model/sequence_spec.rb
|
|
1720
1732
|
- spec/lutaml/model/serializable_spec.rb
|
|
1721
1733
|
- spec/lutaml/model/serializable_validation_spec.rb
|
|
1734
|
+
- spec/lutaml/model/serialize/builder_spec.rb
|
|
1722
1735
|
- spec/lutaml/model/serialize_perf_guard_spec.rb
|
|
1723
1736
|
- spec/lutaml/model/services/transformer_spec.rb
|
|
1724
1737
|
- spec/lutaml/model/simple_model_spec.rb
|
|
@@ -1775,6 +1788,7 @@ files:
|
|
|
1775
1788
|
- spec/lutaml/model/validation/validation_framework_spec.rb
|
|
1776
1789
|
- spec/lutaml/model/validation_spec.rb
|
|
1777
1790
|
- spec/lutaml/model/value_map_spec.rb
|
|
1791
|
+
- spec/lutaml/model/value_policy_spec.rb
|
|
1778
1792
|
- spec/lutaml/model/value_transformation_comprehensive_spec.rb
|
|
1779
1793
|
- spec/lutaml/model/with_child_mapping_spec.rb
|
|
1780
1794
|
- spec/lutaml/model/xml_decoupling_spec.rb
|
|
@@ -1800,6 +1814,7 @@ files:
|
|
|
1800
1814
|
- spec/lutaml/rdf/namespace_spec.rb
|
|
1801
1815
|
- spec/lutaml/rdf/rdf_transform_spec.rb
|
|
1802
1816
|
- spec/lutaml/rdf/term_definition_spec.rb
|
|
1817
|
+
- spec/lutaml/require_load_order_spec.rb
|
|
1803
1818
|
- spec/lutaml/turtle/adapter_spec.rb
|
|
1804
1819
|
- spec/lutaml/turtle/mapping_spec.rb
|
|
1805
1820
|
- spec/lutaml/turtle/transform_spec.rb
|
|
@@ -1810,6 +1825,8 @@ files:
|
|
|
1810
1825
|
- spec/lutaml/xml/adapter/ox_adapter_spec.rb
|
|
1811
1826
|
- spec/lutaml/xml/adapter/rexml_adapter_spec.rb
|
|
1812
1827
|
- spec/lutaml/xml/adapter/xml_namespace_spec.rb
|
|
1828
|
+
- spec/lutaml/xml/attribute_element_namespace_disjoint_spec.rb
|
|
1829
|
+
- spec/lutaml/xml/attribute_namespace_disjointness_spec.rb
|
|
1813
1830
|
- spec/lutaml/xml/builder/builder_spec.rb
|
|
1814
1831
|
- spec/lutaml/xml/clear_parse_state_spec.rb
|
|
1815
1832
|
- spec/lutaml/xml/compiled_rule_namespace_spec.rb
|
|
@@ -1869,6 +1886,7 @@ files:
|
|
|
1869
1886
|
- spec/lutaml/xml/ooxml_namespace_spec.rb
|
|
1870
1887
|
- spec/lutaml/xml/opal_xml_spec.rb
|
|
1871
1888
|
- spec/lutaml/xml/ordered_method_spec.rb
|
|
1889
|
+
- spec/lutaml/xml/out_of_namespace_parsing_spec.rb
|
|
1872
1890
|
- spec/lutaml/xml/pipeline_integration_spec.rb
|
|
1873
1891
|
- spec/lutaml/xml/prefix_control_spec.rb
|
|
1874
1892
|
- spec/lutaml/xml/register_spec.rb
|