lutaml-jsonschema 0.1.3 → 0.1.5
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 +25 -261
- data/frontend/src/App.vue +23 -0
- data/frontend/src/components/AppSidebar.vue +211 -1
- data/frontend/src/components/DetailPanel.vue +212 -2
- data/frontend/src/components/SchemaBuilder.vue +78 -6
- data/frontend/src/stores/schemaStore.ts +23 -0
- data/frontend/src/types.ts +11 -0
- data/frontend/src/views/HomeView.vue +364 -10
- data/lib/lutaml/jsonschema/spa/spa_builder.rb +89 -34
- data/lib/lutaml/jsonschema/spa/spa_definition.rb +4 -0
- data/lib/lutaml/jsonschema/spa/spa_property.rb +2 -0
- data/lib/lutaml/jsonschema/spa/spa_schema.rb +16 -0
- data/lib/lutaml/jsonschema/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a480735cb35e5d992a010e0f3f51d030a53041d67be3e04b748dfca2b79e2cf2
|
|
4
|
+
data.tar.gz: cf7332baaff5e9ceda9171e8baf56a40443f8946527542c8a18d40141899d68e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8511a93b9362c07dbd1403f65a00c2bfeccd0f23b50b35c52ec257a4c22d4911f3578e67bfc7ae01c49f37ee2ed927257995d8ebfb7ec505484cfee61b0d8de2
|
|
7
|
+
data.tar.gz: d5f8b8b703ae21083dfd3b566825be66efc3901f94711d7188a78e3967754d4f6ef185067e967426dd69dfdedc617baee17ff69752ad7faf4ee0d11c8f55b5a6
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,214 +1,72 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2026-05-
|
|
3
|
+
# on 2026-05-07 03:03:38 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
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count: 2
|
|
10
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
-
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation.
|
|
12
|
-
Bundler/OrderedGems:
|
|
13
|
-
Exclude:
|
|
14
|
-
- 'Gemfile'
|
|
15
|
-
|
|
16
|
-
# Offense count: 2
|
|
17
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
18
|
-
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation.
|
|
19
|
-
Gemspec/OrderedDependencies:
|
|
20
|
-
Exclude:
|
|
21
|
-
- 'lutaml-jsonschema.gemspec'
|
|
22
|
-
|
|
23
9
|
# Offense count: 1
|
|
24
10
|
Gemspec/RequiredRubyVersion:
|
|
25
11
|
Exclude:
|
|
26
12
|
- 'lutaml-jsonschema.gemspec'
|
|
27
13
|
|
|
28
|
-
# Offense count:
|
|
14
|
+
# Offense count: 2
|
|
29
15
|
# This cop supports safe autocorrection (--autocorrect).
|
|
30
16
|
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
31
17
|
# SupportedStyles: with_first_argument, with_fixed_indentation
|
|
32
18
|
Layout/ArgumentAlignment:
|
|
33
19
|
Exclude:
|
|
34
|
-
- 'lib/lutaml/jsonschema/cli.rb'
|
|
35
|
-
- 'lib/lutaml/jsonschema/schema_set.rb'
|
|
36
20
|
- 'lib/lutaml/jsonschema/spa/spa_builder.rb'
|
|
37
|
-
- 'lib/lutaml/jsonschema/spa/vue_inlined_strategy.rb'
|
|
38
|
-
- 'spec/lutaml/cli_spec.rb'
|
|
39
|
-
- 'spec/lutaml/generator_spec.rb'
|
|
40
|
-
- 'spec/lutaml/integration_spec.rb'
|
|
41
|
-
- 'spec/lutaml/jsonschema_spec.rb'
|
|
42
|
-
- 'spec/lutaml/schema_set_cross_ref_spec.rb'
|
|
43
|
-
- 'spec/lutaml/schema_set_resolution_spec.rb'
|
|
44
|
-
- 'spec/lutaml/spa_builder_spec.rb'
|
|
45
|
-
|
|
46
|
-
# Offense count: 4
|
|
47
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
48
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
49
|
-
# SupportedStyles: with_first_element, with_fixed_indentation
|
|
50
|
-
Layout/ArrayAlignment:
|
|
51
|
-
Exclude:
|
|
52
|
-
- 'lutaml-jsonschema.gemspec'
|
|
53
|
-
- 'spec/lutaml/cli_spec.rb'
|
|
54
21
|
|
|
55
22
|
# Offense count: 2
|
|
56
23
|
# This cop supports safe autocorrection (--autocorrect).
|
|
57
|
-
# Configuration parameters: IndentationWidth.
|
|
58
|
-
Layout/AssignmentIndentation:
|
|
59
|
-
Exclude:
|
|
60
|
-
- 'lib/lutaml/jsonschema/schema.rb'
|
|
61
|
-
- 'spec/lutaml/jsonschema_spec.rb'
|
|
62
|
-
|
|
63
|
-
# Offense count: 16
|
|
64
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
65
24
|
# Configuration parameters: EnforcedStyleAlignWith.
|
|
66
25
|
# SupportedStylesAlignWith: either, start_of_block, start_of_line
|
|
67
26
|
Layout/BlockAlignment:
|
|
68
27
|
Exclude:
|
|
69
|
-
- 'lib/lutaml/jsonschema/
|
|
70
|
-
- 'lib/lutaml/jsonschema/reference_resolver.rb'
|
|
71
|
-
- 'lib/lutaml/jsonschema/schema_set.rb'
|
|
72
|
-
- 'spec/lutaml/cli_spec.rb'
|
|
73
|
-
- 'spec/lutaml/generator_spec.rb'
|
|
74
|
-
- 'spec/lutaml/integration_spec.rb'
|
|
75
|
-
|
|
76
|
-
# Offense count: 16
|
|
77
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
78
|
-
Layout/BlockEndNewline:
|
|
79
|
-
Exclude:
|
|
80
|
-
- 'lib/lutaml/jsonschema/combiner.rb'
|
|
81
|
-
- 'lib/lutaml/jsonschema/reference_resolver.rb'
|
|
82
|
-
- 'lib/lutaml/jsonschema/schema_set.rb'
|
|
83
|
-
- 'spec/lutaml/cli_spec.rb'
|
|
84
|
-
- 'spec/lutaml/generator_spec.rb'
|
|
85
|
-
- 'spec/lutaml/integration_spec.rb'
|
|
86
|
-
|
|
87
|
-
# Offense count: 4
|
|
88
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
89
|
-
Layout/ClosingParenthesisIndentation:
|
|
90
|
-
Exclude:
|
|
91
|
-
- 'lib/lutaml/jsonschema/reference_resolver.rb'
|
|
92
|
-
- 'lib/lutaml/jsonschema/schema_set.rb'
|
|
93
|
-
- 'spec/lutaml/integration_spec.rb'
|
|
28
|
+
- 'lib/lutaml/jsonschema/spa/spa_builder.rb'
|
|
94
29
|
|
|
95
30
|
# Offense count: 1
|
|
96
31
|
# This cop supports safe autocorrection (--autocorrect).
|
|
97
|
-
Layout/
|
|
32
|
+
Layout/BlockEndNewline:
|
|
98
33
|
Exclude:
|
|
99
|
-
- 'lib/lutaml/jsonschema/
|
|
34
|
+
- 'lib/lutaml/jsonschema/spa/spa_builder.rb'
|
|
100
35
|
|
|
101
36
|
# Offense count: 2
|
|
102
37
|
# This cop supports safe autocorrection (--autocorrect).
|
|
103
|
-
Layout/EmptyLinesAroundMethodBody:
|
|
104
|
-
Exclude:
|
|
105
|
-
- 'lib/lutaml/jsonschema/schema_set.rb'
|
|
106
|
-
|
|
107
|
-
# Offense count: 1
|
|
108
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
109
|
-
# Configuration parameters: EnforcedStyleAlignWith.
|
|
110
|
-
# SupportedStylesAlignWith: keyword, variable, start_of_line
|
|
111
|
-
Layout/EndAlignment:
|
|
112
|
-
Exclude:
|
|
113
|
-
- 'lib/lutaml/jsonschema/reference_resolver.rb'
|
|
114
|
-
|
|
115
|
-
# Offense count: 4
|
|
116
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
117
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
118
|
-
# SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
|
|
119
|
-
Layout/FirstArgumentIndentation:
|
|
120
|
-
Exclude:
|
|
121
|
-
- 'lib/lutaml/jsonschema/reference_resolver.rb'
|
|
122
|
-
- 'lib/lutaml/jsonschema/schema_set.rb'
|
|
123
|
-
- 'spec/lutaml/integration_spec.rb'
|
|
124
|
-
|
|
125
|
-
# Offense count: 32
|
|
126
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
127
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
128
|
-
# SupportedStyles: special_inside_parentheses, consistent, align_braces
|
|
129
|
-
Layout/FirstHashElementIndentation:
|
|
130
|
-
Exclude:
|
|
131
|
-
- 'spec/lutaml/jsonschema_spec.rb'
|
|
132
|
-
- 'spec/lutaml/schema_set_cross_ref_spec.rb'
|
|
133
|
-
|
|
134
|
-
# Offense count: 34
|
|
135
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
136
|
-
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
|
137
|
-
# SupportedHashRocketStyles: key, separator, table
|
|
138
|
-
# SupportedColonStyles: key, separator, table
|
|
139
|
-
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
|
140
|
-
Layout/HashAlignment:
|
|
141
|
-
Exclude:
|
|
142
|
-
- 'lib/lutaml/jsonschema/schema.rb'
|
|
143
|
-
- 'lib/lutaml/jsonschema/spa/spa_definition.rb'
|
|
144
|
-
- 'lib/lutaml/jsonschema/spa/spa_document.rb'
|
|
145
|
-
- 'lib/lutaml/jsonschema/spa/spa_schema.rb'
|
|
146
|
-
- 'lutaml-jsonschema.gemspec'
|
|
147
|
-
- 'spec/lutaml/jsonschema_spec.rb'
|
|
148
|
-
|
|
149
|
-
# Offense count: 4
|
|
150
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
151
|
-
# Configuration parameters: EnforcedStyle.
|
|
152
|
-
# SupportedStyles: normal, indented_internal_methods
|
|
153
|
-
Layout/IndentationConsistency:
|
|
154
|
-
Exclude:
|
|
155
|
-
- 'lib/lutaml/jsonschema/combiner.rb'
|
|
156
|
-
|
|
157
|
-
# Offense count: 35
|
|
158
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
159
38
|
# Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
|
|
160
39
|
# SupportedStylesAlignWith: start_of_line, relative_to_receiver
|
|
161
40
|
Layout/IndentationWidth:
|
|
162
41
|
Exclude:
|
|
163
|
-
- 'lib/lutaml/jsonschema/
|
|
164
|
-
- 'lib/lutaml/jsonschema/reference_resolver.rb'
|
|
165
|
-
- 'lib/lutaml/jsonschema/schema_set.rb'
|
|
166
|
-
- 'spec/lutaml/cli_spec.rb'
|
|
167
|
-
- 'spec/lutaml/generator_spec.rb'
|
|
168
|
-
- 'spec/lutaml/integration_spec.rb'
|
|
42
|
+
- 'lib/lutaml/jsonschema/spa/spa_builder.rb'
|
|
169
43
|
|
|
170
|
-
# Offense count:
|
|
44
|
+
# Offense count: 31
|
|
171
45
|
# This cop supports safe autocorrection (--autocorrect).
|
|
172
46
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
173
47
|
# URISchemes: http, https
|
|
174
48
|
Layout/LineLength:
|
|
175
|
-
Enabled: false
|
|
176
|
-
|
|
177
|
-
# Offense count: 1
|
|
178
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
179
|
-
Layout/MultilineBlockLayout:
|
|
180
49
|
Exclude:
|
|
50
|
+
- 'lib/lutaml/jsonschema/base.rb'
|
|
51
|
+
- 'lib/lutaml/jsonschema/cli.rb'
|
|
181
52
|
- 'lib/lutaml/jsonschema/combiner.rb'
|
|
182
|
-
|
|
183
|
-
# Offense count: 3
|
|
184
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
185
|
-
# Configuration parameters: EnforcedStyle.
|
|
186
|
-
# SupportedStyles: symmetrical, new_line, same_line
|
|
187
|
-
Layout/MultilineMethodCallBraceLayout:
|
|
188
|
-
Exclude:
|
|
189
|
-
- 'lib/lutaml/jsonschema/reference_resolver.rb'
|
|
53
|
+
- 'lib/lutaml/jsonschema/schema.rb'
|
|
190
54
|
- 'lib/lutaml/jsonschema/schema_set.rb'
|
|
55
|
+
- 'lib/lutaml/jsonschema/spa/spa_builder.rb'
|
|
56
|
+
- 'lib/lutaml/jsonschema/spa/vue_inlined_strategy.rb'
|
|
57
|
+
- 'lutaml-jsonschema.gemspec'
|
|
191
58
|
- 'spec/lutaml/integration_spec.rb'
|
|
59
|
+
- 'spec/lutaml/jsonschema_spec.rb'
|
|
60
|
+
- 'spec/lutaml/schema_set_cross_ref_spec.rb'
|
|
61
|
+
- 'spec/lutaml/schema_set_resolution_spec.rb'
|
|
62
|
+
- 'spec/lutaml/spa_builder_spec.rb'
|
|
192
63
|
|
|
193
|
-
# Offense count:
|
|
194
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
195
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
196
|
-
# SupportedStyles: aligned, indented, indented_relative_to_receiver
|
|
197
|
-
Layout/MultilineMethodCallIndentation:
|
|
198
|
-
Exclude:
|
|
199
|
-
- 'spec/lutaml/integration_spec.rb'
|
|
200
|
-
|
|
201
|
-
# Offense count: 1
|
|
202
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
203
|
-
Layout/RescueEnsureAlignment:
|
|
204
|
-
Exclude:
|
|
205
|
-
- 'lib/lutaml/jsonschema/schema_set.rb'
|
|
206
|
-
|
|
207
|
-
# Offense count: 53
|
|
64
|
+
# Offense count: 2
|
|
208
65
|
# This cop supports safe autocorrection (--autocorrect).
|
|
209
66
|
# Configuration parameters: AllowInHeredoc.
|
|
210
67
|
Layout/TrailingWhitespace:
|
|
211
|
-
|
|
68
|
+
Exclude:
|
|
69
|
+
- 'lib/lutaml/jsonschema/spa/spa_builder.rb'
|
|
212
70
|
|
|
213
71
|
# Offense count: 2
|
|
214
72
|
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
|
|
@@ -222,23 +80,7 @@ Lint/IneffectiveAccessModifier:
|
|
|
222
80
|
Exclude:
|
|
223
81
|
- 'lib/lutaml/jsonschema/schema_set.rb'
|
|
224
82
|
|
|
225
|
-
# Offense count:
|
|
226
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
227
|
-
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
|
|
228
|
-
# NotImplementedExceptions: NotImplementedError
|
|
229
|
-
Lint/UnusedMethodArgument:
|
|
230
|
-
Exclude:
|
|
231
|
-
- 'lib/lutaml/jsonschema/schema_set.rb'
|
|
232
|
-
|
|
233
|
-
# Offense count: 3
|
|
234
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
235
|
-
Lint/UselessAssignment:
|
|
236
|
-
Exclude:
|
|
237
|
-
- 'lib/lutaml/jsonschema/spa/spa_builder.rb'
|
|
238
|
-
- 'spec/lutaml/integration_spec.rb'
|
|
239
|
-
- 'spec/lutaml/spa_builder_spec.rb'
|
|
240
|
-
|
|
241
|
-
# Offense count: 13
|
|
83
|
+
# Offense count: 14
|
|
242
84
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
243
85
|
Metrics/AbcSize:
|
|
244
86
|
Exclude:
|
|
@@ -294,13 +136,7 @@ Naming/PredicateMethod:
|
|
|
294
136
|
Exclude:
|
|
295
137
|
- 'lib/lutaml/jsonschema/schema_set.rb'
|
|
296
138
|
|
|
297
|
-
# Offense count:
|
|
298
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
299
|
-
Performance/ConstantRegexp:
|
|
300
|
-
Exclude:
|
|
301
|
-
- 'spec/lutaml/cli_spec.rb'
|
|
302
|
-
|
|
303
|
-
# Offense count: 25
|
|
139
|
+
# Offense count: 2
|
|
304
140
|
# This cop supports safe autocorrection (--autocorrect).
|
|
305
141
|
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
|
306
142
|
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
|
@@ -309,11 +145,7 @@ Performance/ConstantRegexp:
|
|
|
309
145
|
# AllowedMethods: lambda, proc, it
|
|
310
146
|
Style/BlockDelimiters:
|
|
311
147
|
Exclude:
|
|
312
|
-
- 'lib/lutaml/jsonschema/
|
|
313
|
-
- 'lib/lutaml/jsonschema/schema_set.rb'
|
|
314
|
-
- 'spec/lutaml/cli_spec.rb'
|
|
315
|
-
- 'spec/lutaml/generator_spec.rb'
|
|
316
|
-
- 'spec/lutaml/integration_spec.rb'
|
|
148
|
+
- 'lib/lutaml/jsonschema/spa/spa_builder.rb'
|
|
317
149
|
|
|
318
150
|
# Offense count: 2
|
|
319
151
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
@@ -321,76 +153,8 @@ Style/IdenticalConditionalBranches:
|
|
|
321
153
|
Exclude:
|
|
322
154
|
- 'spec/lutaml/spa_builder_spec.rb'
|
|
323
155
|
|
|
324
|
-
# Offense count: 6
|
|
325
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
326
|
-
Style/MultilineIfModifier:
|
|
327
|
-
Exclude:
|
|
328
|
-
- 'lib/lutaml/jsonschema/schema_set.rb'
|
|
329
|
-
|
|
330
|
-
# Offense count: 2
|
|
331
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
332
|
-
Style/MultilineTernaryOperator:
|
|
333
|
-
Exclude:
|
|
334
|
-
- 'lib/lutaml/jsonschema/reference_resolver.rb'
|
|
335
|
-
|
|
336
|
-
# Offense count: 1
|
|
337
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
338
|
-
Style/RedundantBegin:
|
|
339
|
-
Exclude:
|
|
340
|
-
- 'lib/lutaml/jsonschema/schema_set.rb'
|
|
341
|
-
|
|
342
|
-
# Offense count: 1
|
|
343
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
344
|
-
# Configuration parameters: AllowMultipleReturnValues.
|
|
345
|
-
Style/RedundantReturn:
|
|
346
|
-
Exclude:
|
|
347
|
-
- 'lib/lutaml/jsonschema/schema_set.rb'
|
|
348
|
-
|
|
349
|
-
# Offense count: 1
|
|
350
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
351
|
-
Style/RescueModifier:
|
|
352
|
-
Exclude:
|
|
353
|
-
- 'lib/lutaml/jsonschema/schema_set.rb'
|
|
354
|
-
|
|
355
156
|
# Offense count: 1
|
|
356
|
-
# This cop supports
|
|
357
|
-
|
|
358
|
-
# SupportedStyles: implicit, explicit
|
|
359
|
-
Style/RescueStandardError:
|
|
360
|
-
Exclude:
|
|
361
|
-
- 'lib/lutaml/jsonschema/schema_set.rb'
|
|
362
|
-
|
|
363
|
-
# Offense count: 35
|
|
364
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
365
|
-
# Configuration parameters: EnforcedStyleForMultiline.
|
|
366
|
-
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
|
|
367
|
-
Style/TrailingCommaInArguments:
|
|
157
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
158
|
+
Style/MapIntoArray:
|
|
368
159
|
Exclude:
|
|
369
|
-
- 'lib/lutaml/jsonschema/combiner.rb'
|
|
370
|
-
- 'lib/lutaml/jsonschema/configuration.rb'
|
|
371
|
-
- 'lib/lutaml/jsonschema/schema.rb'
|
|
372
160
|
- 'lib/lutaml/jsonschema/spa/spa_builder.rb'
|
|
373
|
-
- 'spec/lutaml/generator_spec.rb'
|
|
374
|
-
- 'spec/lutaml/integration_spec.rb'
|
|
375
|
-
- 'spec/lutaml/jsonschema_spec.rb'
|
|
376
|
-
- 'spec/lutaml/schema_set_cross_ref_spec.rb'
|
|
377
|
-
- 'spec/lutaml/schema_set_resolution_spec.rb'
|
|
378
|
-
- 'spec/lutaml/spa_builder_spec.rb'
|
|
379
|
-
- 'spec/lutaml/spa_spec.rb'
|
|
380
|
-
|
|
381
|
-
# Offense count: 4
|
|
382
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
383
|
-
# Configuration parameters: EnforcedStyleForMultiline.
|
|
384
|
-
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
|
|
385
|
-
Style/TrailingCommaInArrayLiteral:
|
|
386
|
-
Exclude:
|
|
387
|
-
- 'spec/lutaml/jsonschema_spec.rb'
|
|
388
|
-
|
|
389
|
-
# Offense count: 23
|
|
390
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
391
|
-
# Configuration parameters: EnforcedStyleForMultiline.
|
|
392
|
-
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
|
|
393
|
-
Style/TrailingCommaInHashLiteral:
|
|
394
|
-
Exclude:
|
|
395
|
-
- 'spec/lutaml/jsonschema_spec.rb'
|
|
396
|
-
- 'spec/lutaml/schema_set_cross_ref_spec.rb'
|
data/frontend/src/App.vue
CHANGED
|
@@ -34,9 +34,32 @@ onMounted(() => {
|
|
|
34
34
|
uiStore.updateResolvedTheme()
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
handleHashNavigation()
|
|
38
|
+
|
|
37
39
|
document.addEventListener('keydown', handleKeydown)
|
|
40
|
+
window.addEventListener('hashchange', handleHashNavigation)
|
|
38
41
|
})
|
|
39
42
|
|
|
43
|
+
function handleHashNavigation() {
|
|
44
|
+
const hash = window.location.hash.slice(1)
|
|
45
|
+
if (!hash) return
|
|
46
|
+
|
|
47
|
+
const parts = hash.split('/')
|
|
48
|
+
if (parts.length >= 1 && schemaStore.schemas.length > 0) {
|
|
49
|
+
const schemaName = decodeURIComponent(parts[0])
|
|
50
|
+
schemaStore.selectSchema(schemaName)
|
|
51
|
+
|
|
52
|
+
if (parts.length >= 2) {
|
|
53
|
+
const target = decodeURIComponent(parts[1])
|
|
54
|
+
if (target.startsWith('def-')) {
|
|
55
|
+
schemaStore.selectDefinition(target.slice(4))
|
|
56
|
+
} else if (target.startsWith('prop-')) {
|
|
57
|
+
schemaStore.selectProperty(target.slice(5))
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
40
63
|
function handleKeydown(e: KeyboardEvent) {
|
|
41
64
|
if (e.key === '/' && !isInputFocused()) {
|
|
42
65
|
e.preventDefault()
|
|
@@ -34,7 +34,36 @@
|
|
|
34
34
|
<div class="section-header">
|
|
35
35
|
<span class="section-title">Schemas</span>
|
|
36
36
|
</div>
|
|
37
|
-
<div class="
|
|
37
|
+
<div class="search-box">
|
|
38
|
+
<svg class="search-icon" width="14" height="14" viewBox="0 0 14 14" fill="none">
|
|
39
|
+
<circle cx="5.5" cy="5.5" r="4.5" stroke="currentColor" stroke-width="1.3"/>
|
|
40
|
+
<path d="M9 9l4 4" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/>
|
|
41
|
+
</svg>
|
|
42
|
+
<input
|
|
43
|
+
v-model="searchQuery"
|
|
44
|
+
type="text"
|
|
45
|
+
class="search-input"
|
|
46
|
+
placeholder="Search schemas, definitions..."
|
|
47
|
+
/>
|
|
48
|
+
<button v-if="searchQuery" class="search-clear" @click="searchQuery = ''">
|
|
49
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none">
|
|
50
|
+
<path d="M3 3l6 6M9 3l-6 6" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
|
|
51
|
+
</svg>
|
|
52
|
+
</button>
|
|
53
|
+
</div>
|
|
54
|
+
<div v-if="searchQuery && searchResults.length" class="search-results">
|
|
55
|
+
<button
|
|
56
|
+
v-for="result in searchResults"
|
|
57
|
+
:key="`${result.type}:${result.name}@${result.schemaName}`"
|
|
58
|
+
class="search-result-item"
|
|
59
|
+
@click="goToSearchResult(result)"
|
|
60
|
+
>
|
|
61
|
+
<span class="badge" :class="resultBadgeClass(result.type)">{{ resultTypeLabel(result.type) }}</span>
|
|
62
|
+
<span class="search-result-name">{{ result.title || result.name }}</span>
|
|
63
|
+
<span class="search-result-schema text-muted">{{ result.schemaName }}</span>
|
|
64
|
+
</button>
|
|
65
|
+
</div>
|
|
66
|
+
<div v-else class="schema-tree">
|
|
38
67
|
<div
|
|
39
68
|
v-for="schema in schemaStore.schemas"
|
|
40
69
|
:key="schema.name"
|
|
@@ -49,6 +78,7 @@
|
|
|
49
78
|
<path d="M4 3l3 3-3 3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
50
79
|
</svg>
|
|
51
80
|
<span class="schema-name">{{ schema.title || schema.name }}</span>
|
|
81
|
+
<span v-if="schema.$id" class="schema-id-hint" :title="schema.$id">{{ schema.$id }}</span>
|
|
52
82
|
<span class="schema-badge-count">{{ schema.definitions.length }}D</span>
|
|
53
83
|
</div>
|
|
54
84
|
|
|
@@ -62,6 +92,7 @@
|
|
|
62
92
|
>
|
|
63
93
|
<span class="badge badge-definition-sm">D</span>
|
|
64
94
|
<span class="tree-item-name">{{ def.title || def.name }}</span>
|
|
95
|
+
<span class="tree-item-count">{{ def.properties.length }}</span>
|
|
65
96
|
</div>
|
|
66
97
|
</div>
|
|
67
98
|
</div>
|
|
@@ -100,6 +131,7 @@
|
|
|
100
131
|
Generated with
|
|
101
132
|
<a href="https://github.com/lutaml/lutaml-jsonschema" target="_blank" rel="noopener">LutaML JSON Schema</a>
|
|
102
133
|
</span>
|
|
134
|
+
<span v-if="schemaStore.metadata?.version" class="footer-text">{{ schemaStore.metadata.version }}</span>
|
|
103
135
|
</div>
|
|
104
136
|
</div>
|
|
105
137
|
</div>
|
|
@@ -107,12 +139,55 @@
|
|
|
107
139
|
</template>
|
|
108
140
|
|
|
109
141
|
<script setup lang="ts">
|
|
142
|
+
import { ref, computed } from 'vue'
|
|
110
143
|
import { useSchemaStore } from '../stores/schemaStore'
|
|
111
144
|
import { useUiStore } from '../stores/uiStore'
|
|
145
|
+
import type { SpaSearchEntry } from '../types'
|
|
112
146
|
|
|
113
147
|
const schemaStore = useSchemaStore()
|
|
114
148
|
const uiStore = useUiStore()
|
|
115
149
|
|
|
150
|
+
const searchQuery = ref('')
|
|
151
|
+
|
|
152
|
+
const searchResults = computed(() => {
|
|
153
|
+
const q = searchQuery.value.trim().toLowerCase()
|
|
154
|
+
if (!q) return []
|
|
155
|
+
return schemaStore.searchIndex.filter(entry =>
|
|
156
|
+
entry.name.toLowerCase().includes(q) ||
|
|
157
|
+
(entry.title && entry.title.toLowerCase().includes(q)) ||
|
|
158
|
+
entry.schemaName.toLowerCase().includes(q),
|
|
159
|
+
).slice(0, 15)
|
|
160
|
+
})
|
|
161
|
+
|
|
162
|
+
function goToSearchResult(result: SpaSearchEntry) {
|
|
163
|
+
schemaStore.selectSchema(result.schemaName)
|
|
164
|
+
if (result.type === 'definition') {
|
|
165
|
+
schemaStore.selectDefinition(result.name)
|
|
166
|
+
} else if (result.type === 'property') {
|
|
167
|
+
schemaStore.selectProperty(result.name)
|
|
168
|
+
}
|
|
169
|
+
searchQuery.value = ''
|
|
170
|
+
uiStore.closeDetailPanel()
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function resultTypeLabel(type: string): string {
|
|
174
|
+
switch (type) {
|
|
175
|
+
case 'schema': return 'S'
|
|
176
|
+
case 'definition': return 'D'
|
|
177
|
+
case 'property': return 'P'
|
|
178
|
+
default: return '?'
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function resultBadgeClass(type: string): string {
|
|
183
|
+
switch (type) {
|
|
184
|
+
case 'schema': return 'badge-schema-sm'
|
|
185
|
+
case 'definition': return 'badge-definition-sm'
|
|
186
|
+
case 'property': return 'badge-property-sm'
|
|
187
|
+
default: return ''
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
116
191
|
function goHome() {
|
|
117
192
|
schemaStore.selectSchema(null)
|
|
118
193
|
uiStore.closeDetailPanel()
|
|
@@ -296,6 +371,17 @@ function selectDefinition(schemaName: string, defName: string) {
|
|
|
296
371
|
text-overflow: ellipsis;
|
|
297
372
|
}
|
|
298
373
|
|
|
374
|
+
.schema-id-hint {
|
|
375
|
+
font-size: 9px;
|
|
376
|
+
font-family: var(--font-mono);
|
|
377
|
+
color: var(--text-muted);
|
|
378
|
+
max-width: 80px;
|
|
379
|
+
overflow: hidden;
|
|
380
|
+
text-overflow: ellipsis;
|
|
381
|
+
white-space: nowrap;
|
|
382
|
+
flex-shrink: 0;
|
|
383
|
+
}
|
|
384
|
+
|
|
299
385
|
.schema-badge-count {
|
|
300
386
|
font-size: var(--text-xs);
|
|
301
387
|
color: var(--text-muted);
|
|
@@ -342,6 +428,15 @@ function selectDefinition(schemaName: string, defName: string) {
|
|
|
342
428
|
text-overflow: ellipsis;
|
|
343
429
|
}
|
|
344
430
|
|
|
431
|
+
.tree-item-count {
|
|
432
|
+
font-size: 10px;
|
|
433
|
+
color: var(--text-muted);
|
|
434
|
+
background: var(--bg-primary);
|
|
435
|
+
padding: 0px 4px;
|
|
436
|
+
border-radius: 2px;
|
|
437
|
+
flex-shrink: 0;
|
|
438
|
+
}
|
|
439
|
+
|
|
345
440
|
.badge-definition-sm {
|
|
346
441
|
background: var(--badge-definition-bg);
|
|
347
442
|
color: var(--badge-definition);
|
|
@@ -352,6 +447,121 @@ function selectDefinition(schemaName: string, defName: string) {
|
|
|
352
447
|
flex-shrink: 0;
|
|
353
448
|
}
|
|
354
449
|
|
|
450
|
+
.badge-schema-sm {
|
|
451
|
+
background: var(--badge-schema-bg);
|
|
452
|
+
color: var(--badge-schema);
|
|
453
|
+
font-size: 9px;
|
|
454
|
+
padding: 1px 4px;
|
|
455
|
+
border-radius: 2px;
|
|
456
|
+
font-weight: 600;
|
|
457
|
+
flex-shrink: 0;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.badge-property-sm {
|
|
461
|
+
background: var(--bg-secondary);
|
|
462
|
+
color: var(--text-muted);
|
|
463
|
+
font-size: 9px;
|
|
464
|
+
padding: 1px 4px;
|
|
465
|
+
border-radius: 2px;
|
|
466
|
+
font-weight: 600;
|
|
467
|
+
flex-shrink: 0;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/* Search */
|
|
471
|
+
.search-box {
|
|
472
|
+
position: relative;
|
|
473
|
+
margin-bottom: var(--space-2);
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.search-icon {
|
|
477
|
+
position: absolute;
|
|
478
|
+
left: 8px;
|
|
479
|
+
top: 50%;
|
|
480
|
+
transform: translateY(-50%);
|
|
481
|
+
color: var(--text-muted);
|
|
482
|
+
pointer-events: none;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.search-input {
|
|
486
|
+
width: 100%;
|
|
487
|
+
padding: 6px 28px 6px 28px;
|
|
488
|
+
font-size: var(--text-sm);
|
|
489
|
+
background: var(--bg-primary);
|
|
490
|
+
border: 1px solid var(--border-light);
|
|
491
|
+
border-radius: var(--radius-md);
|
|
492
|
+
color: var(--text-primary);
|
|
493
|
+
font-family: var(--font-sans);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.search-input::placeholder {
|
|
497
|
+
color: var(--text-muted);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
.search-input:focus {
|
|
501
|
+
outline: none;
|
|
502
|
+
border-color: var(--color-primary);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.search-clear {
|
|
506
|
+
position: absolute;
|
|
507
|
+
right: 6px;
|
|
508
|
+
top: 50%;
|
|
509
|
+
transform: translateY(-50%);
|
|
510
|
+
color: var(--text-muted);
|
|
511
|
+
background: none;
|
|
512
|
+
border: none;
|
|
513
|
+
cursor: pointer;
|
|
514
|
+
padding: 2px;
|
|
515
|
+
display: flex;
|
|
516
|
+
align-items: center;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.search-clear:hover {
|
|
520
|
+
color: var(--text-primary);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.search-results {
|
|
524
|
+
display: flex;
|
|
525
|
+
flex-direction: column;
|
|
526
|
+
gap: 1px;
|
|
527
|
+
margin-bottom: var(--space-2);
|
|
528
|
+
max-height: 250px;
|
|
529
|
+
overflow-y: auto;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.search-result-item {
|
|
533
|
+
display: flex;
|
|
534
|
+
align-items: center;
|
|
535
|
+
gap: var(--space-2);
|
|
536
|
+
padding: 4px 6px;
|
|
537
|
+
font-size: var(--text-xs);
|
|
538
|
+
text-align: left;
|
|
539
|
+
background: var(--bg-primary);
|
|
540
|
+
border: none;
|
|
541
|
+
border-radius: var(--radius-sm);
|
|
542
|
+
cursor: pointer;
|
|
543
|
+
width: 100%;
|
|
544
|
+
transition: background var(--transition-fast);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.search-result-item:hover {
|
|
548
|
+
background: var(--bg-hover);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.search-result-name {
|
|
552
|
+
flex: 1;
|
|
553
|
+
color: var(--text-primary);
|
|
554
|
+
font-weight: 500;
|
|
555
|
+
white-space: nowrap;
|
|
556
|
+
overflow: hidden;
|
|
557
|
+
text-overflow: ellipsis;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
.search-result-schema {
|
|
561
|
+
font-size: 10px;
|
|
562
|
+
white-space: nowrap;
|
|
563
|
+
}
|
|
564
|
+
|
|
355
565
|
.stats-section {
|
|
356
566
|
background: var(--bg-primary);
|
|
357
567
|
}
|