lutaml-xsd 1.1.1 → 1.1.3

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 (57) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +6 -0
  3. data/.rubocop_todo.yml +87 -18
  4. data/Gemfile +1 -0
  5. data/frontend/dist/app.iife.js +8 -8
  6. data/frontend/dist/style.css +1 -1
  7. data/frontend/src/components/DetailPanel.vue +2 -2
  8. data/frontend/src/components/GroupTreeItem.vue +210 -0
  9. data/frontend/src/components/SchemaOverview.vue +10 -0
  10. data/frontend/src/components/SourceView.vue +8 -6
  11. data/frontend/src/components/TypeDefinition.vue +2 -14
  12. data/frontend/src/components/TypeOverview.vue +189 -6
  13. data/frontend/src/stores/schemaStore.ts +3 -3
  14. data/frontend/src/types.ts +32 -12
  15. data/frontend/src/views/HomeView.vue +3 -3
  16. data/lib/lutaml/xsd/commands/element_command.rb +24 -24
  17. data/lib/lutaml/xsd/commands/namespace_command.rb +6 -6
  18. data/lib/lutaml/xsd/commands/type_command.rb +31 -31
  19. data/lib/lutaml/xsd/commands/validate_command.rb +14 -14
  20. data/lib/lutaml/xsd/coverage_analyzer.rb +1 -2
  21. data/lib/lutaml/xsd/dependency_grapher.rb +39 -55
  22. data/lib/lutaml/xsd/errors/message_builder.rb +3 -3
  23. data/lib/lutaml/xsd/errors/suggesters/fuzzy_matcher.rb +6 -10
  24. data/lib/lutaml/xsd/namespace_prefix_manager.rb +3 -3
  25. data/lib/lutaml/xsd/namespace_remapper.rb +1 -1
  26. data/lib/lutaml/xsd/package_builder.rb +2 -2
  27. data/lib/lutaml/xsd/package_validator.rb +17 -25
  28. data/lib/lutaml/xsd/rng_to_xsd_converter.rb +1342 -0
  29. data/lib/lutaml/xsd/schema_classifier.rb +5 -5
  30. data/lib/lutaml/xsd/schema_repository/type_index.rb +32 -0
  31. data/lib/lutaml/xsd/schema_repository.rb +105 -40
  32. data/lib/lutaml/xsd/schema_repository_package.rb +3 -3
  33. data/lib/lutaml/xsd/schema_resolver.rb +1 -1
  34. data/lib/lutaml/xsd/spa/schema_serializer.rb +293 -175
  35. data/lib/lutaml/xsd/spa/svg/config/color_scheme.rb +8 -0
  36. data/lib/lutaml/xsd/spa/svg/renderers/element_renderer.rb +1 -1
  37. data/lib/lutaml/xsd/spa/svg/renderers/type_renderer.rb +1 -1
  38. data/lib/lutaml/xsd/spa/utils/extract_enumeration.rb +8 -13
  39. data/lib/lutaml/xsd/spa/xml_instance_generator.rb +40 -42
  40. data/lib/lutaml/xsd/type_hierarchy_analyzer.rb +7 -7
  41. data/lib/lutaml/xsd/type_searcher.rb +1 -2
  42. data/lib/lutaml/xsd/validation/facets/facet_validator.rb +1 -1
  43. data/lib/lutaml/xsd/validation/result_collector.rb +1 -3
  44. data/lib/lutaml/xsd/validation/rules/attribute_validation_rule.rb +16 -23
  45. data/lib/lutaml/xsd/validation/rules/content_model_validation_rule.rb +19 -40
  46. data/lib/lutaml/xsd/validation/rules/element_structure_rule.rb +2 -3
  47. data/lib/lutaml/xsd/validation/rules/occurrence_validation_rule.rb +7 -16
  48. data/lib/lutaml/xsd/validation/rules/type_validation_rule.rb +17 -27
  49. data/lib/lutaml/xsd/validation/xml_document.rb +3 -3
  50. data/lib/lutaml/xsd/validation/xml_element.rb +2 -2
  51. data/lib/lutaml/xsd/version.rb +1 -1
  52. data/lib/lutaml/xsd/xsd_bundler.rb +2 -2
  53. data/lib/lutaml/xsd/xsd_model_extensions.rb +66 -0
  54. data/lib/lutaml/xsd/xsd_spec_validator.rb +9 -13
  55. data/lib/lutaml/xsd.rb +2 -0
  56. data/lutaml-xsd.gemspec +1 -0
  57. metadata +19 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29e9ba5ed3edf116b76cdf22ed853a37399d00ffda6b11f78a0cccdb5502b4e4
4
- data.tar.gz: 6213f84485cad0ffed1eef19d60ae29fea7d5e274522ba8dfcc996048694e677
3
+ metadata.gz: ab65095d3489bfa5198ceb55652108b864e7a5be7c71c11e4bf4e008c434cdf1
4
+ data.tar.gz: eeb2e432c1cceceec5bc5b88197ba86a12e07deb7402a49bdc9b054ee9e5f051
5
5
  SHA512:
6
- metadata.gz: 07a2c5d774d76218e043372749950daa031c3b1ff3177a4eb65c5a05de6e6747479bbbd4acd7a5c7a808553bb75e62808d66bb68157324b4341d25045e11aa0b
7
- data.tar.gz: cba0111db7b0b7bf12fb9e0c55edbdfcbc4e3f4f11a653957ad663e6d8c067a1980bcbb7a54898f50b6e408869ca56d0179a822a7fcae8ba201111c68fceeb15
6
+ metadata.gz: ae06973a7e5c075298b86870a414d398329f57d74fc6eba07f435a0af51002bfbda1ace3e9021fda1ccd586eadc0875c3c576150cd2bf30aad5aef1557852277
7
+ data.tar.gz: 34b409a1da1fb13fca086a57ad18aba81d0d3ebc6e4aaf0fcd9f4e1b7df2653240cd094dab9f64974f618d6fa4a208af0f7b739d804ccf16d4baa720ad7634c2
data/.gitignore CHANGED
@@ -29,3 +29,9 @@ frontend/dist/
29
29
  # Frontend index with mock data (should not be committed)
30
30
  frontend/index.html
31
31
 
32
+
33
+ # Transient build artifacts
34
+ *.gem
35
+ examples/*/pkg/
36
+ examples/*.html
37
+ examples/archive-old/
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2026-04-27 11:46:52 UTC using RuboCop version 1.86.1.
3
+ # on 2026-05-10 22:39:49 UTC using RuboCop version 1.86.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -11,42 +11,71 @@ Gemspec/RequiredRubyVersion:
11
11
  Exclude:
12
12
  - 'lutaml-xsd.gemspec'
13
13
 
14
+ # Offense count: 12
15
+ # This cop supports safe autocorrection (--autocorrect).
16
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
17
+ # SupportedStyles: with_first_argument, with_fixed_indentation
18
+ Layout/ArgumentAlignment:
19
+ Exclude:
20
+ - 'spec/lutaml/xsd/spa/schema_serializer_spec.rb'
21
+
14
22
  # Offense count: 1
15
23
  # This cop supports safe autocorrection (--autocorrect).
24
+ # Configuration parameters: IndentationWidth.
25
+ Layout/AssignmentIndentation:
26
+ Exclude:
27
+ - 'lib/lutaml/xsd/spa/schema_serializer.rb'
28
+
29
+ # Offense count: 3
30
+ # This cop supports safe autocorrection (--autocorrect).
16
31
  # Configuration parameters: EnforcedStyleAlignWith.
17
32
  # SupportedStylesAlignWith: either, start_of_block, start_of_line
18
33
  Layout/BlockAlignment:
19
34
  Exclude:
20
- - 'lib/lutaml/xsd/spa/schema_serializer.rb'
35
+ - 'lib/lutaml/xsd/errors/suggesters/fuzzy_matcher.rb'
36
+ - 'spec/lutaml/xsd/spa/schema_serializer_spec.rb'
21
37
 
22
38
  # Offense count: 1
23
39
  # This cop supports safe autocorrection (--autocorrect).
24
40
  Layout/BlockEndNewline:
25
41
  Exclude:
26
- - 'lib/lutaml/xsd/spa/schema_serializer.rb'
42
+ - 'spec/lutaml/xsd/spa/schema_serializer_spec.rb'
27
43
 
28
- # Offense count: 2
44
+ # Offense count: 16
45
+ # This cop supports safe autocorrection (--autocorrect).
46
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
47
+ # SupportedHashRocketStyles: key, separator, table
48
+ # SupportedColonStyles: key, separator, table
49
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
50
+ Layout/HashAlignment:
51
+ Exclude:
52
+ - 'lib/lutaml/xsd/xsd_model_extensions.rb'
53
+ - 'spec/lutaml/xsd/spa/schema_serializer_spec.rb'
54
+
55
+ # Offense count: 4
29
56
  # This cop supports safe autocorrection (--autocorrect).
30
57
  # Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
31
58
  # SupportedStylesAlignWith: start_of_line, relative_to_receiver
32
59
  Layout/IndentationWidth:
33
60
  Exclude:
34
- - 'lib/lutaml/xsd/spa/schema_serializer.rb'
61
+ - 'lib/lutaml/xsd/errors/suggesters/fuzzy_matcher.rb'
62
+ - 'spec/lutaml/xsd/spa/schema_serializer_spec.rb'
35
63
 
36
- # Offense count: 722
64
+ # Offense count: 636
37
65
  # This cop supports safe autocorrection (--autocorrect).
38
66
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
39
67
  # URISchemes: http, https
40
68
  Layout/LineLength:
41
69
  Enabled: false
42
70
 
43
- # Offense count: 1
71
+ # Offense count: 11
44
72
  # This cop supports safe autocorrection (--autocorrect).
45
- # Configuration parameters: EnforcedStyle, IndentationWidth.
46
- # SupportedStyles: aligned, indented
47
- Layout/MultilineOperationIndentation:
73
+ # Configuration parameters: AllowInHeredoc.
74
+ Layout/TrailingWhitespace:
48
75
  Exclude:
49
76
  - 'lib/lutaml/xsd/spa/schema_serializer.rb'
77
+ - 'lib/lutaml/xsd/xsd_model_extensions.rb'
78
+ - 'spec/lutaml/xsd/spa/schema_serializer_spec.rb'
50
79
 
51
80
  # Offense count: 11
52
81
  # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
@@ -81,38 +110,38 @@ Lint/UselessRescue:
81
110
  Exclude:
82
111
  - 'lib/lutaml/xsd/validation/rule_engine.rb'
83
112
 
84
- # Offense count: 269
113
+ # Offense count: 264
85
114
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
86
115
  Metrics/AbcSize:
87
116
  Enabled: false
88
117
 
89
- # Offense count: 22
118
+ # Offense count: 21
90
119
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
91
120
  # AllowedMethods: refine
92
121
  Metrics/BlockLength:
93
122
  Max: 57
94
123
 
95
- # Offense count: 18
124
+ # Offense count: 16
96
125
  # Configuration parameters: CountBlocks, CountModifierForms.
97
126
  Metrics/BlockNesting:
98
127
  Max: 5
99
128
 
100
- # Offense count: 201
129
+ # Offense count: 175
101
130
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
102
131
  Metrics/CyclomaticComplexity:
103
132
  Enabled: false
104
133
 
105
- # Offense count: 373
134
+ # Offense count: 368
106
135
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
107
136
  Metrics/MethodLength:
108
137
  Max: 90
109
138
 
110
- # Offense count: 6
139
+ # Offense count: 7
111
140
  # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
112
141
  Metrics/ParameterLists:
113
142
  Max: 9
114
143
 
115
- # Offense count: 151
144
+ # Offense count: 134
116
145
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
117
146
  Metrics/PerceivedComplexity:
118
147
  Enabled: false
@@ -186,7 +215,7 @@ Security/MarshalLoad:
186
215
  # AllowedMethods: lambda, proc, it
187
216
  Style/BlockDelimiters:
188
217
  Exclude:
189
- - 'lib/lutaml/xsd/spa/schema_serializer.rb'
218
+ - 'spec/lutaml/xsd/spa/schema_serializer_spec.rb'
190
219
 
191
220
  # Offense count: 6
192
221
  Style/DocumentDynamicEvalDefinition:
@@ -214,6 +243,19 @@ Style/IdenticalConditionalBranches:
214
243
  Exclude:
215
244
  - 'lib/lutaml/xsd/package_tree_formatter.rb'
216
245
 
246
+ # Offense count: 2
247
+ # This cop supports unsafe autocorrection (--autocorrect-all).
248
+ Style/MapIntoArray:
249
+ Exclude:
250
+ - 'lib/lutaml/xsd/schema_repository.rb'
251
+ - 'lib/lutaml/xsd/xsd_spec_validator.rb'
252
+
253
+ # Offense count: 1
254
+ # This cop supports safe autocorrection (--autocorrect).
255
+ Style/MultilineIfModifier:
256
+ Exclude:
257
+ - 'lib/lutaml/xsd/spa/schema_serializer.rb'
258
+
217
259
  # Offense count: 1
218
260
  Style/OpenStructUse:
219
261
  Exclude:
@@ -226,9 +268,36 @@ Style/OptionalBooleanParameter:
226
268
  Exclude:
227
269
  - 'lib/lutaml/xsd/spa/output_mode.rb'
228
270
 
271
+ # Offense count: 2
272
+ # This cop supports safe autocorrection (--autocorrect).
273
+ # Configuration parameters: AllowedMethods.
274
+ # AllowedMethods: infinite?, nonzero?
275
+ Style/RedundantCondition:
276
+ Exclude:
277
+ - 'lib/lutaml/xsd/spa/schema_serializer.rb'
278
+ - 'lib/lutaml/xsd/validation/rules/content_model_validation_rule.rb'
279
+
280
+ # Offense count: 4
281
+ # This cop supports unsafe autocorrection (--autocorrect-all).
282
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
283
+ # AllowedMethods: present?, blank?, presence, try, try!
284
+ Style/SafeNavigation:
285
+ Exclude:
286
+ - 'lib/lutaml/xsd/errors/suggesters/fuzzy_matcher.rb'
287
+ - 'lib/lutaml/xsd/spa/schema_serializer.rb'
288
+
229
289
  # Offense count: 2
230
290
  # This cop supports unsafe autocorrection (--autocorrect-all).
231
291
  # Configuration parameters: Mode.
232
292
  Style/StringConcatenation:
233
293
  Exclude:
234
294
  - 'lib/lutaml/xsd/validation/xml_navigator.rb'
295
+
296
+ # Offense count: 2
297
+ # This cop supports unsafe autocorrection (--autocorrect-all).
298
+ # Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
299
+ # AllowedMethods: define_method
300
+ Style/SymbolProc:
301
+ Exclude:
302
+ - 'lib/lutaml/xsd/schema_repository.rb'
303
+ - 'lib/lutaml/xsd/xsd_spec_validator.rb'
data/Gemfile CHANGED
@@ -12,6 +12,7 @@ gem "liquid"
12
12
  gem "lutaml-model", github: "lutaml/lutaml-model", branch: "main"
13
13
  gem "nokogiri"
14
14
  gem "rake"
15
+ gem "rng", github: "lutaml/rng", branch: "fix-include-define"
15
16
  gem "rspec"
16
17
  gem "rubocop"
17
18
  gem "rubocop-performance"