lutaml-model 0.8.32 → 0.8.34
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.yml +5 -0
- data/Gemfile +4 -0
- data/README.adoc +39 -0
- data/docs/conversion_caching.adoc +143 -0
- data/lib/compat/opal/lutaml_model_boot.rb +15 -0
- data/lib/lutaml/model/attribute.rb +89 -0
- data/lib/lutaml/model/config.rb +13 -0
- data/lib/lutaml/model/configuration.rb +23 -0
- data/lib/lutaml/model/error/fraction_digits_error.rb +20 -0
- data/lib/lutaml/model/error/length_error.rb +19 -0
- data/lib/lutaml/model/error/max_exclusive_error.rb +19 -0
- data/lib/lutaml/model/error/max_inclusive_error.rb +20 -0
- data/lib/lutaml/model/error/max_length_error.rb +20 -0
- data/lib/lutaml/model/error/min_exclusive_error.rb +19 -0
- data/lib/lutaml/model/error/min_inclusive_error.rb +20 -0
- data/lib/lutaml/model/error/min_length_error.rb +20 -0
- data/lib/lutaml/model/error/restriction_error.rb +8 -0
- data/lib/lutaml/model/error/total_digits_error.rb +20 -0
- data/lib/lutaml/model/error/type/max_exclusive_error.rb +20 -0
- data/lib/lutaml/model/error/type/min_exclusive_error.rb +20 -0
- data/lib/lutaml/model/error/type.rb +2 -0
- data/lib/lutaml/model/restriction_validation.rb +437 -0
- data/lib/lutaml/model/schema/definitions/restricted_type.rb +4 -2
- data/lib/lutaml/model/schema/renderers/restricted_type.rb +134 -4
- data/lib/lutaml/model/schema/rng_compiler/define_classifier.rb +3 -0
- data/lib/lutaml/model/schema/rng_compiler/rng_helpers.rb +9 -1
- data/lib/lutaml/model/schema/rng_compiler/value_type_resolver.rb +2 -0
- data/lib/lutaml/model/schema/templates.rb +2 -0
- data/lib/lutaml/model/schema/xml_compiler/spec_builder/simple_types.rb +39 -7
- data/lib/lutaml/model/schema/xml_compiler/supported_data_types.rb +3 -0
- data/lib/lutaml/model/serialize/attribute_definition.rb +18 -7
- data/lib/lutaml/model/serialize/builder.rb +4 -5
- data/lib/lutaml/model/serialize/conversion_caching.rb +124 -0
- data/lib/lutaml/model/serialize/enum_handling.rb +50 -11
- data/lib/lutaml/model/serialize/format_conversion.rb +46 -38
- data/lib/lutaml/model/serialize/initialization.rb +4 -2
- data/lib/lutaml/model/serialize.rb +61 -0
- data/lib/lutaml/model/services/type/validator.rb +23 -0
- data/lib/lutaml/model/type/string.rb +28 -3
- data/lib/lutaml/model/type/value.rb +231 -0
- data/lib/lutaml/model/type.rb +2 -0
- data/lib/lutaml/model/validation.rb +2 -1
- data/lib/lutaml/model/version.rb +1 -1
- data/lib/lutaml/model.rb +16 -0
- data/lib/lutaml/xml/model_transform.rb +47 -6
- data/lib/lutaml/xml/schema/xsd/max_exclusive.rb +1 -1
- data/lib/lutaml/xml/schema/xsd/min_exclusive.rb +1 -1
- data/lib/lutaml/xml/schema/xsd_schema.rb +183 -11
- data/lib/lutaml/xml/transformation/order_reconciler.rb +267 -0
- data/lib/lutaml/xml/transformation/ordered_applier.rb +80 -122
- data/lib/lutaml/xml/transformation/rule_compiler.rb +2 -0
- data/lib/lutaml/xml/transformation.rb +2 -0
- data/lib/lutaml/xml/transformation_support.rb +1 -0
- data/spec/fixtures/xml/restriction_facets.xsd +46 -0
- data/spec/lutaml/model/attribute_restriction_spec.rb +472 -0
- data/spec/lutaml/model/attribute_spec.rb +7 -2
- data/spec/lutaml/model/collection_reader_liveness_spec.rb +516 -0
- data/spec/lutaml/model/conversion_caching_spec.rb +280 -0
- data/spec/lutaml/model/lazy_collection_spec.rb +28 -3
- data/spec/lutaml/model/parsed_model_mutation_spec.rb +486 -0
- data/spec/lutaml/model/phantom_value_spec.rb +799 -0
- data/spec/lutaml/model/schema/renderers/restricted_type_spec.rb +1 -0
- data/spec/lutaml/model/schema/xsd_schema_spec.rb +340 -695
- data/spec/lutaml/model/serialize_perf_guard_spec.rb +53 -1
- data/spec/lutaml/model/type_digit_facet_spec.rb +229 -0
- data/spec/lutaml/model/type_facet_restriction_spec.rb +667 -0
- data/spec/lutaml/model/type_white_space_facet_spec.rb +132 -0
- data/spec/lutaml/xml/schema/compiler_spec.rb +302 -0
- data/spec/lutaml/xml/schema/facet_round_trip_spec.rb +153 -0
- metadata +27 -1
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.34
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
@@ -289,6 +289,7 @@ files:
|
|
|
289
289
|
- docs/bugreports/BUGREPORT_element_order_render_empty.md
|
|
290
290
|
- docs/cli_compare.adoc
|
|
291
291
|
- docs/collection_validation.adoc
|
|
292
|
+
- docs/conversion_caching.adoc
|
|
292
293
|
- docs/index.adoc
|
|
293
294
|
- docs/key_value_data_model.adoc
|
|
294
295
|
- docs/model_transforms.adoc
|
|
@@ -431,6 +432,7 @@ files:
|
|
|
431
432
|
- lib/lutaml/model/error/collection_true_missing_error.rb
|
|
432
433
|
- lib/lutaml/model/error/element_count_out_of_range_error.rb
|
|
433
434
|
- lib/lutaml/model/error/format_adapter_not_specified_error.rb
|
|
435
|
+
- lib/lutaml/model/error/fraction_digits_error.rb
|
|
434
436
|
- lib/lutaml/model/error/import_model_with_root_error.rb
|
|
435
437
|
- lib/lutaml/model/error/incorrect_mapping_argument_error.rb
|
|
436
438
|
- lib/lutaml/model/error/incorrect_sequence_error.rb
|
|
@@ -440,12 +442,19 @@ files:
|
|
|
440
442
|
- lib/lutaml/model/error/invalid_choice_range_error.rb
|
|
441
443
|
- lib/lutaml/model/error/invalid_format_error.rb
|
|
442
444
|
- lib/lutaml/model/error/invalid_value_error.rb
|
|
445
|
+
- lib/lutaml/model/error/length_error.rb
|
|
443
446
|
- lib/lutaml/model/error/liquid_class_not_found_error.rb
|
|
444
447
|
- lib/lutaml/model/error/liquid_drop_already_registered_error.rb
|
|
445
448
|
- lib/lutaml/model/error/liquid_not_enabled_error.rb
|
|
446
449
|
- lib/lutaml/model/error/mapping_already_exists_error.rb
|
|
447
450
|
- lib/lutaml/model/error/mapping_attribute_missing_error.rb
|
|
448
451
|
- lib/lutaml/model/error/mapping_attribute_type_error.rb
|
|
452
|
+
- lib/lutaml/model/error/max_exclusive_error.rb
|
|
453
|
+
- lib/lutaml/model/error/max_inclusive_error.rb
|
|
454
|
+
- lib/lutaml/model/error/max_length_error.rb
|
|
455
|
+
- lib/lutaml/model/error/min_exclusive_error.rb
|
|
456
|
+
- lib/lutaml/model/error/min_inclusive_error.rb
|
|
457
|
+
- lib/lutaml/model/error/min_length_error.rb
|
|
449
458
|
- lib/lutaml/model/error/mixed_content_collection_error.rb
|
|
450
459
|
- lib/lutaml/model/error/multiple_mappings_error.rb
|
|
451
460
|
- lib/lutaml/model/error/no_attributes_defined_liquid_error.rb
|
|
@@ -457,15 +466,19 @@ files:
|
|
|
457
466
|
- lib/lutaml/model/error/polymorphic_error.rb
|
|
458
467
|
- lib/lutaml/model/error/register/not_registrable_class_error.rb
|
|
459
468
|
- lib/lutaml/model/error/required_attribute_missing_error.rb
|
|
469
|
+
- lib/lutaml/model/error/restriction_error.rb
|
|
460
470
|
- lib/lutaml/model/error/reverse_transform_block_not_defined_error.rb
|
|
461
471
|
- lib/lutaml/model/error/reverse_transformation_declaration_error.rb
|
|
462
472
|
- lib/lutaml/model/error/sorting_configuration_conflict_error.rb
|
|
473
|
+
- lib/lutaml/model/error/total_digits_error.rb
|
|
463
474
|
- lib/lutaml/model/error/transform_block_not_defined_error.rb
|
|
464
475
|
- lib/lutaml/model/error/type.rb
|
|
465
476
|
- lib/lutaml/model/error/type/invalid_value_error.rb
|
|
466
477
|
- lib/lutaml/model/error/type/max_bound_error.rb
|
|
478
|
+
- lib/lutaml/model/error/type/max_exclusive_error.rb
|
|
467
479
|
- lib/lutaml/model/error/type/max_length_error.rb
|
|
468
480
|
- lib/lutaml/model/error/type/min_bound_error.rb
|
|
481
|
+
- lib/lutaml/model/error/type/min_exclusive_error.rb
|
|
469
482
|
- lib/lutaml/model/error/type/min_length_error.rb
|
|
470
483
|
- lib/lutaml/model/error/type/pattern_not_matched_error.rb
|
|
471
484
|
- lib/lutaml/model/error/type_error.rb
|
|
@@ -509,6 +522,7 @@ files:
|
|
|
509
522
|
- lib/lutaml/model/register/namespace_binding.rb
|
|
510
523
|
- lib/lutaml/model/registrable.rb
|
|
511
524
|
- lib/lutaml/model/render_policy.rb
|
|
525
|
+
- lib/lutaml/model/restriction_validation.rb
|
|
512
526
|
- lib/lutaml/model/runtime_compatibility.rb
|
|
513
527
|
- lib/lutaml/model/schema.rb
|
|
514
528
|
- lib/lutaml/model/schema/base_schema.rb
|
|
@@ -588,6 +602,7 @@ files:
|
|
|
588
602
|
- lib/lutaml/model/serialize.rb
|
|
589
603
|
- lib/lutaml/model/serialize/attribute_definition.rb
|
|
590
604
|
- lib/lutaml/model/serialize/builder.rb
|
|
605
|
+
- lib/lutaml/model/serialize/conversion_caching.rb
|
|
591
606
|
- lib/lutaml/model/serialize/deserialization_context.rb
|
|
592
607
|
- lib/lutaml/model/serialize/enum_handling.rb
|
|
593
608
|
- lib/lutaml/model/serialize/format_conversion.rb
|
|
@@ -887,6 +902,7 @@ files:
|
|
|
887
902
|
- lib/lutaml/xml/transformation.rb
|
|
888
903
|
- lib/lutaml/xml/transformation/custom_method_wrapper.rb
|
|
889
904
|
- lib/lutaml/xml/transformation/element_builder.rb
|
|
905
|
+
- lib/lutaml/xml/transformation/order_reconciler.rb
|
|
890
906
|
- lib/lutaml/xml/transformation/ordered_applier.rb
|
|
891
907
|
- lib/lutaml/xml/transformation/rule_applier.rb
|
|
892
908
|
- lib/lutaml/xml/transformation/rule_compiler.rb
|
|
@@ -973,6 +989,7 @@ files:
|
|
|
973
989
|
- spec/fixtures/xml/latin_encoding.xml
|
|
974
990
|
- spec/fixtures/xml/math_document_schema.xsd
|
|
975
991
|
- spec/fixtures/xml/product_catalog.xsd
|
|
992
|
+
- spec/fixtures/xml/restriction_facets.xsd
|
|
976
993
|
- spec/fixtures/xml/schema/rnc/address_book.rnc
|
|
977
994
|
- spec/fixtures/xml/schema/rnc/book_features.rnc
|
|
978
995
|
- spec/fixtures/xml/schema/rnc/includes/book.rnc
|
|
@@ -1671,6 +1688,7 @@ files:
|
|
|
1671
1688
|
- spec/lutaml/model/attribute_collection_spec.rb
|
|
1672
1689
|
- spec/lutaml/model/attribute_default_cache_spec.rb
|
|
1673
1690
|
- spec/lutaml/model/attribute_form_default_spec.rb
|
|
1691
|
+
- spec/lutaml/model/attribute_restriction_spec.rb
|
|
1674
1692
|
- spec/lutaml/model/attribute_spec.rb
|
|
1675
1693
|
- spec/lutaml/model/boot_manifest_spec.rb
|
|
1676
1694
|
- spec/lutaml/model/cached_type_resolver_spec.rb
|
|
@@ -1681,6 +1699,7 @@ files:
|
|
|
1681
1699
|
- spec/lutaml/model/cli_spec.rb
|
|
1682
1700
|
- spec/lutaml/model/collection_index_spec.rb
|
|
1683
1701
|
- spec/lutaml/model/collection_mutation_spec.rb
|
|
1702
|
+
- spec/lutaml/model/collection_reader_liveness_spec.rb
|
|
1684
1703
|
- spec/lutaml/model/collection_register_spec.rb
|
|
1685
1704
|
- spec/lutaml/model/collection_single_value_coercion_spec.rb
|
|
1686
1705
|
- spec/lutaml/model/collection_spec.rb
|
|
@@ -1690,6 +1709,7 @@ files:
|
|
|
1690
1709
|
- spec/lutaml/model/compiled_rule_spec.rb
|
|
1691
1710
|
- spec/lutaml/model/consolidation_spec.rb
|
|
1692
1711
|
- spec/lutaml/model/context_registry_spec.rb
|
|
1712
|
+
- spec/lutaml/model/conversion_caching_spec.rb
|
|
1693
1713
|
- spec/lutaml/model/custom_bibtex_adapter_spec.rb
|
|
1694
1714
|
- spec/lutaml/model/custom_collection_spec.rb
|
|
1695
1715
|
- spec/lutaml/model/custom_from_empty_values_spec.rb
|
|
@@ -1736,6 +1756,8 @@ files:
|
|
|
1736
1756
|
- spec/lutaml/model/opal_smoke_spec.rb
|
|
1737
1757
|
- spec/lutaml/model/optimization_spec.rb
|
|
1738
1758
|
- spec/lutaml/model/ordered_content_spec.rb
|
|
1759
|
+
- spec/lutaml/model/parsed_model_mutation_spec.rb
|
|
1760
|
+
- spec/lutaml/model/phantom_value_spec.rb
|
|
1739
1761
|
- spec/lutaml/model/polymorphic_spec.rb
|
|
1740
1762
|
- spec/lutaml/model/processing_instruction_spec.rb
|
|
1741
1763
|
- spec/lutaml/model/raw_adapter_require_spec.rb
|
|
@@ -1795,10 +1817,13 @@ files:
|
|
|
1795
1817
|
- spec/lutaml/model/type/uri_spec.rb
|
|
1796
1818
|
- spec/lutaml/model/type/value_xml_mapping_spec.rb
|
|
1797
1819
|
- spec/lutaml/model/type_context_spec.rb
|
|
1820
|
+
- spec/lutaml/model/type_digit_facet_spec.rb
|
|
1821
|
+
- spec/lutaml/model/type_facet_restriction_spec.rb
|
|
1798
1822
|
- spec/lutaml/model/type_registry_spec.rb
|
|
1799
1823
|
- spec/lutaml/model/type_resolver_spec.rb
|
|
1800
1824
|
- spec/lutaml/model/type_spec.rb
|
|
1801
1825
|
- spec/lutaml/model/type_substitution_spec.rb
|
|
1826
|
+
- spec/lutaml/model/type_white_space_facet_spec.rb
|
|
1802
1827
|
- spec/lutaml/model/uninitialized_class_deep_dup_spec.rb
|
|
1803
1828
|
- spec/lutaml/model/uninitialized_class_spec.rb
|
|
1804
1829
|
- spec/lutaml/model/union_attribute_spec.rb
|
|
@@ -1929,6 +1954,7 @@ files:
|
|
|
1929
1954
|
- spec/lutaml/xml/reused_elements_namespace_spec.rb
|
|
1930
1955
|
- spec/lutaml/xml/root_mappings/nested_child_mappings_spec.rb
|
|
1931
1956
|
- spec/lutaml/xml/schema/compiler_spec.rb
|
|
1957
|
+
- spec/lutaml/xml/schema/facet_round_trip_spec.rb
|
|
1932
1958
|
- spec/lutaml/xml/schema/rnc_compiler_spec.rb
|
|
1933
1959
|
- spec/lutaml/xml/schema/rng_compiler_spec.rb
|
|
1934
1960
|
- spec/lutaml/xml/schema/xsd/errors/error_context_spec.rb
|