metaschema 0.2.0 → 0.2.1
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 +510 -12
- data/lib/metaschema/allowed_value_type.rb +1 -1
- data/lib/metaschema/anchor_type.rb +1 -1
- data/lib/metaschema/augment_type.rb +39 -0
- data/lib/metaschema/code_type.rb +1 -1
- data/lib/metaschema/constraint_validator.rb +483 -0
- data/lib/metaschema/inline_markup_type.rb +1 -1
- data/lib/metaschema/json_schema_generator.rb +456 -0
- data/lib/metaschema/list_item_type.rb +1 -1
- data/lib/metaschema/markdown_doc_generator.rb +354 -0
- data/lib/metaschema/markup_line_datatype.rb +1 -1
- data/lib/metaschema/metapath_evaluator.rb +385 -0
- data/lib/metaschema/model_generator.rb +2175 -0
- data/lib/metaschema/preformatted_type.rb +1 -1
- data/lib/metaschema/root.rb +2 -0
- data/lib/metaschema/ruby_source_emitter.rb +869 -0
- data/lib/metaschema/table_cell_type.rb +1 -1
- data/lib/metaschema/type_mapper.rb +82 -0
- data/lib/metaschema/version.rb +1 -1
- data/lib/metaschema.rb +8 -0
- metadata +10 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ab01e7082a78f755a4aab0f12f4e6d0a57fda8c2c61c8820b44d084bd35e700e
|
|
4
|
+
data.tar.gz: dde048935f730d08385f69cf32c3b56fd3e370786a716b3a643dfe68207a5c04
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 34ca02dd41aa6febd4d4dd6b167633040477381366fbd2dec9c503adcd83a7588dfcc9bdfc808ac7321940292c0c5cd35dbce22b7765a6999065eb8e2be14c3e
|
|
7
|
+
data.tar.gz: d7c2da1a6bd83bbacc9d301c548a124972c1280dc1f4b3429412368dc4ed0ebfa5b871e7aa18f5abc719440bb5cbcd1282c64fcd26a0e8a924ad2eb783b8fe5b
|
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-
|
|
3
|
+
# on 2026-04-21 23:09:15 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,49 +11,366 @@ Gemspec/RequiredRubyVersion:
|
|
|
11
11
|
Exclude:
|
|
12
12
|
- 'metaschema.gemspec'
|
|
13
13
|
|
|
14
|
-
# Offense count:
|
|
14
|
+
# Offense count: 21
|
|
15
15
|
# This cop supports safe autocorrection (--autocorrect).
|
|
16
16
|
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
17
17
|
# SupportedStyles: with_first_argument, with_fixed_indentation
|
|
18
18
|
Layout/ArgumentAlignment:
|
|
19
19
|
Exclude:
|
|
20
|
-
- 'lib/metaschema.rb'
|
|
20
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
21
|
+
- 'lib/metaschema/model_generator.rb'
|
|
22
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
23
|
+
- 'spec/model_generator_spec.rb'
|
|
24
|
+
- 'spec/ruby_source_emitter_spec.rb'
|
|
25
|
+
|
|
26
|
+
# Offense count: 10
|
|
27
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
28
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
29
|
+
# SupportedStyles: with_first_element, with_fixed_indentation
|
|
30
|
+
Layout/ArrayAlignment:
|
|
31
|
+
Exclude:
|
|
32
|
+
- 'lib/metaschema/markdown_doc_generator.rb'
|
|
33
|
+
- 'lib/metaschema/model_generator.rb'
|
|
34
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
35
|
+
|
|
36
|
+
# Offense count: 6
|
|
37
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
38
|
+
# Configuration parameters: IndentationWidth.
|
|
39
|
+
Layout/AssignmentIndentation:
|
|
40
|
+
Exclude:
|
|
41
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
42
|
+
- 'lib/metaschema/model_generator.rb'
|
|
43
|
+
|
|
44
|
+
# Offense count: 74
|
|
45
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
46
|
+
# Configuration parameters: EnforcedStyleAlignWith.
|
|
47
|
+
# SupportedStylesAlignWith: either, start_of_block, start_of_line
|
|
48
|
+
Layout/BlockAlignment:
|
|
49
|
+
Exclude:
|
|
50
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
51
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
52
|
+
- 'lib/metaschema/markdown_doc_generator.rb'
|
|
53
|
+
- 'lib/metaschema/metapath_evaluator.rb'
|
|
54
|
+
- 'lib/metaschema/model_generator.rb'
|
|
55
|
+
|
|
56
|
+
# Offense count: 71
|
|
57
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
58
|
+
Layout/BlockEndNewline:
|
|
59
|
+
Exclude:
|
|
60
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
61
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
62
|
+
- 'lib/metaschema/markdown_doc_generator.rb'
|
|
63
|
+
- 'lib/metaschema/metapath_evaluator.rb'
|
|
64
|
+
- 'lib/metaschema/model_generator.rb'
|
|
65
|
+
|
|
66
|
+
# Offense count: 7
|
|
67
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
68
|
+
# Configuration parameters: AllowForAlignment.
|
|
69
|
+
Layout/CommentIndentation:
|
|
70
|
+
Exclude:
|
|
71
|
+
- 'lib/metaschema/model_generator.rb'
|
|
72
|
+
|
|
73
|
+
# Offense count: 10
|
|
74
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
75
|
+
Layout/ElseAlignment:
|
|
76
|
+
Exclude:
|
|
77
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
78
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
79
|
+
- 'lib/metaschema/model_generator.rb'
|
|
80
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
81
|
+
|
|
82
|
+
# Offense count: 40
|
|
83
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
84
|
+
Layout/EmptyLineAfterGuardClause:
|
|
85
|
+
Exclude:
|
|
86
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
87
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
88
|
+
- 'lib/metaschema/markdown_doc_generator.rb'
|
|
89
|
+
- 'lib/metaschema/metapath_evaluator.rb'
|
|
90
|
+
- 'lib/metaschema/model_generator.rb'
|
|
91
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
21
92
|
|
|
22
93
|
# Offense count: 1
|
|
23
94
|
# This cop supports safe autocorrection (--autocorrect).
|
|
95
|
+
# Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, DefLikeMacros, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
|
|
96
|
+
Layout/EmptyLineBetweenDefs:
|
|
97
|
+
Exclude:
|
|
98
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
99
|
+
|
|
100
|
+
# Offense count: 1
|
|
101
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
102
|
+
Layout/EmptyLines:
|
|
103
|
+
Exclude:
|
|
104
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
105
|
+
|
|
106
|
+
# Offense count: 1
|
|
107
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
108
|
+
Layout/EmptyLinesAroundMethodBody:
|
|
109
|
+
Exclude:
|
|
110
|
+
- 'lib/metaschema/metapath_evaluator.rb'
|
|
111
|
+
|
|
112
|
+
# Offense count: 11
|
|
113
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
114
|
+
# Configuration parameters: EnforcedStyleAlignWith.
|
|
115
|
+
# SupportedStylesAlignWith: keyword, variable, start_of_line
|
|
116
|
+
Layout/EndAlignment:
|
|
117
|
+
Exclude:
|
|
118
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
119
|
+
- 'lib/metaschema/model_generator.rb'
|
|
120
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
121
|
+
|
|
122
|
+
# Offense count: 1
|
|
123
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
124
|
+
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
|
|
125
|
+
Layout/ExtraSpacing:
|
|
126
|
+
Exclude:
|
|
127
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
128
|
+
|
|
129
|
+
# Offense count: 33
|
|
130
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
131
|
+
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
|
132
|
+
# SupportedHashRocketStyles: key, separator, table
|
|
133
|
+
# SupportedColonStyles: key, separator, table
|
|
134
|
+
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
|
135
|
+
Layout/HashAlignment:
|
|
136
|
+
Exclude:
|
|
137
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
138
|
+
- 'lib/metaschema/model_generator.rb'
|
|
139
|
+
- 'spec/model_generator_spec.rb'
|
|
140
|
+
|
|
141
|
+
# Offense count: 33
|
|
142
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
24
143
|
# Configuration parameters: EnforcedStyle.
|
|
25
|
-
# SupportedStyles:
|
|
26
|
-
Layout/
|
|
144
|
+
# SupportedStyles: normal, indented_internal_methods
|
|
145
|
+
Layout/IndentationConsistency:
|
|
27
146
|
Exclude:
|
|
28
|
-
- 'lib/metaschema.rb'
|
|
147
|
+
- 'lib/metaschema/model_generator.rb'
|
|
148
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
29
149
|
|
|
30
|
-
# Offense count:
|
|
150
|
+
# Offense count: 174
|
|
151
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
152
|
+
# Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
|
|
153
|
+
# SupportedStylesAlignWith: start_of_line, relative_to_receiver
|
|
154
|
+
Layout/IndentationWidth:
|
|
155
|
+
Exclude:
|
|
156
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
157
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
158
|
+
- 'lib/metaschema/markdown_doc_generator.rb'
|
|
159
|
+
- 'lib/metaschema/metapath_evaluator.rb'
|
|
160
|
+
- 'lib/metaschema/model_generator.rb'
|
|
161
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
162
|
+
|
|
163
|
+
# Offense count: 208
|
|
31
164
|
# This cop supports safe autocorrection (--autocorrect).
|
|
32
165
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
33
166
|
# URISchemes: http, https
|
|
34
167
|
Layout/LineLength:
|
|
35
168
|
Exclude:
|
|
36
|
-
- 'lib/metaschema.rb'
|
|
169
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
170
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
171
|
+
- 'lib/metaschema/markdown_doc_generator.rb'
|
|
172
|
+
- 'lib/metaschema/metapath_evaluator.rb'
|
|
173
|
+
- 'lib/metaschema/model_generator.rb'
|
|
174
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
37
175
|
- 'spec/metaschema_spec.rb'
|
|
176
|
+
- 'spec/model_generator_spec.rb'
|
|
177
|
+
- 'spec/ruby_source_emitter_spec.rb'
|
|
178
|
+
|
|
179
|
+
# Offense count: 2
|
|
180
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
181
|
+
Layout/MultilineBlockLayout:
|
|
182
|
+
Exclude:
|
|
183
|
+
- 'lib/metaschema/model_generator.rb'
|
|
184
|
+
|
|
185
|
+
# Offense count: 5
|
|
186
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
187
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
188
|
+
# SupportedStyles: aligned, indented, indented_relative_to_receiver
|
|
189
|
+
Layout/MultilineMethodCallIndentation:
|
|
190
|
+
Exclude:
|
|
191
|
+
- 'lib/metaschema/model_generator.rb'
|
|
192
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
38
193
|
|
|
39
|
-
# Offense count:
|
|
194
|
+
# Offense count: 7
|
|
195
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
196
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
197
|
+
# SupportedStyles: aligned, indented
|
|
198
|
+
Layout/MultilineOperationIndentation:
|
|
199
|
+
Exclude:
|
|
200
|
+
- 'lib/metaschema/model_generator.rb'
|
|
201
|
+
|
|
202
|
+
# Offense count: 57
|
|
40
203
|
# This cop supports safe autocorrection (--autocorrect).
|
|
41
204
|
# Configuration parameters: AllowInHeredoc.
|
|
42
205
|
Layout/TrailingWhitespace:
|
|
43
206
|
Exclude:
|
|
44
|
-
- 'lib/metaschema.rb'
|
|
207
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
208
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
209
|
+
- 'lib/metaschema/markdown_doc_generator.rb'
|
|
210
|
+
- 'lib/metaschema/metapath_evaluator.rb'
|
|
211
|
+
- 'lib/metaschema/model_generator.rb'
|
|
212
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
213
|
+
- 'spec/ruby_source_emitter_spec.rb'
|
|
214
|
+
|
|
215
|
+
# Offense count: 4
|
|
216
|
+
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
|
|
217
|
+
Lint/DuplicateBranch:
|
|
218
|
+
Exclude:
|
|
219
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
220
|
+
- 'lib/metaschema/model_generator.rb'
|
|
45
221
|
|
|
46
222
|
# Offense count: 1
|
|
223
|
+
Lint/IneffectiveAccessModifier:
|
|
224
|
+
Exclude:
|
|
225
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
226
|
+
|
|
227
|
+
# Offense count: 6
|
|
228
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
229
|
+
# Configuration parameters: AllowedMethods, InferNonNilReceiver, AdditionalNilMethods.
|
|
230
|
+
# AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal?
|
|
231
|
+
# AdditionalNilMethods: present?, blank?, try, try!
|
|
232
|
+
Lint/RedundantSafeNavigation:
|
|
233
|
+
Exclude:
|
|
234
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
235
|
+
- 'lib/metaschema/markdown_doc_generator.rb'
|
|
236
|
+
- 'lib/metaschema/model_generator.rb'
|
|
237
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
238
|
+
|
|
239
|
+
# Offense count: 2
|
|
240
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
241
|
+
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
|
242
|
+
Lint/UnusedBlockArgument:
|
|
243
|
+
Exclude:
|
|
244
|
+
- 'lib/metaschema/model_generator.rb'
|
|
245
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
246
|
+
|
|
247
|
+
# Offense count: 10
|
|
248
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
249
|
+
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
|
|
250
|
+
# NotImplementedExceptions: NotImplementedError
|
|
251
|
+
Lint/UnusedMethodArgument:
|
|
252
|
+
Exclude:
|
|
253
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
254
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
255
|
+
- 'lib/metaschema/markdown_doc_generator.rb'
|
|
256
|
+
- 'lib/metaschema/model_generator.rb'
|
|
257
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
258
|
+
|
|
259
|
+
# Offense count: 1
|
|
260
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
261
|
+
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
|
|
262
|
+
Lint/UselessAccessModifier:
|
|
263
|
+
Exclude:
|
|
264
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
265
|
+
|
|
266
|
+
# Offense count: 4
|
|
267
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
268
|
+
Lint/UselessAssignment:
|
|
269
|
+
Exclude:
|
|
270
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
271
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
272
|
+
- 'lib/metaschema/model_generator.rb'
|
|
273
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
274
|
+
|
|
275
|
+
# Offense count: 82
|
|
276
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
277
|
+
Metrics/AbcSize:
|
|
278
|
+
Exclude:
|
|
279
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
280
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
281
|
+
- 'lib/metaschema/markdown_doc_generator.rb'
|
|
282
|
+
- 'lib/metaschema/metapath_evaluator.rb'
|
|
283
|
+
- 'lib/metaschema/model_generator.rb'
|
|
284
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
285
|
+
- 'lib/metaschema/type_mapper.rb'
|
|
286
|
+
|
|
287
|
+
# Offense count: 15
|
|
47
288
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
|
|
48
289
|
# AllowedMethods: refine
|
|
49
290
|
Metrics/BlockLength:
|
|
50
|
-
Max:
|
|
291
|
+
Max: 52
|
|
292
|
+
|
|
293
|
+
# Offense count: 86
|
|
294
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
295
|
+
Metrics/CyclomaticComplexity:
|
|
296
|
+
Exclude:
|
|
297
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
298
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
299
|
+
- 'lib/metaschema/markdown_doc_generator.rb'
|
|
300
|
+
- 'lib/metaschema/metapath_evaluator.rb'
|
|
301
|
+
- 'lib/metaschema/model_generator.rb'
|
|
302
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
303
|
+
|
|
304
|
+
# Offense count: 106
|
|
305
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
306
|
+
Metrics/MethodLength:
|
|
307
|
+
Max: 283
|
|
51
308
|
|
|
52
309
|
# Offense count: 2
|
|
310
|
+
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
|
311
|
+
Metrics/ParameterLists:
|
|
312
|
+
Max: 7
|
|
313
|
+
|
|
314
|
+
# Offense count: 72
|
|
315
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
316
|
+
Metrics/PerceivedComplexity:
|
|
317
|
+
Exclude:
|
|
318
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
319
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
320
|
+
- 'lib/metaschema/markdown_doc_generator.rb'
|
|
321
|
+
- 'lib/metaschema/metapath_evaluator.rb'
|
|
322
|
+
- 'lib/metaschema/model_generator.rb'
|
|
323
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
324
|
+
|
|
325
|
+
# Offense count: 20
|
|
326
|
+
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
|
327
|
+
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
|
|
328
|
+
Naming/MethodParameterName:
|
|
329
|
+
Exclude:
|
|
330
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
331
|
+
- 'lib/metaschema/markdown_doc_generator.rb'
|
|
332
|
+
- 'lib/metaschema/metapath_evaluator.rb'
|
|
333
|
+
|
|
334
|
+
# Offense count: 23
|
|
335
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
336
|
+
Performance/MapCompact:
|
|
337
|
+
Exclude:
|
|
338
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
339
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
340
|
+
- 'lib/metaschema/markdown_doc_generator.rb'
|
|
341
|
+
- 'lib/metaschema/model_generator.rb'
|
|
342
|
+
|
|
343
|
+
# Offense count: 8
|
|
344
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
345
|
+
Performance/StringIdentifierArgument:
|
|
346
|
+
Exclude:
|
|
347
|
+
- 'lib/metaschema/model_generator.rb'
|
|
348
|
+
|
|
349
|
+
# Offense count: 1
|
|
350
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
351
|
+
Performance/StringInclude:
|
|
352
|
+
Exclude:
|
|
353
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
354
|
+
|
|
355
|
+
# Offense count: 1
|
|
356
|
+
RSpec/DescribeMethod:
|
|
357
|
+
Exclude:
|
|
358
|
+
- 'spec/model_generator_spec.rb'
|
|
359
|
+
|
|
360
|
+
# Offense count: 8
|
|
53
361
|
# Configuration parameters: CountAsOne.
|
|
54
362
|
RSpec/ExampleLength:
|
|
55
363
|
Max: 10
|
|
56
364
|
|
|
365
|
+
# Offense count: 9
|
|
366
|
+
RSpec/MultipleExpectations:
|
|
367
|
+
Max: 2
|
|
368
|
+
|
|
369
|
+
# Offense count: 4
|
|
370
|
+
# Configuration parameters: AllowSubject.
|
|
371
|
+
RSpec/MultipleMemoizedHelpers:
|
|
372
|
+
Max: 7
|
|
373
|
+
|
|
57
374
|
# Offense count: 1
|
|
58
375
|
# Configuration parameters: AllowedPatterns.
|
|
59
376
|
# AllowedPatterns: ^expect_, ^assert_
|
|
@@ -62,9 +379,190 @@ RSpec/NoExpectationExample:
|
|
|
62
379
|
- 'spec/metaschema_spec.rb'
|
|
63
380
|
|
|
64
381
|
# Offense count: 2
|
|
382
|
+
# Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata, InflectorPath, EnforcedInflector.
|
|
383
|
+
# SupportedInflectors: default, active_support
|
|
384
|
+
RSpec/SpecFilePathFormat:
|
|
385
|
+
Exclude:
|
|
386
|
+
- 'spec/model_generator_spec.rb'
|
|
387
|
+
- 'spec/ruby_source_emitter_spec.rb'
|
|
388
|
+
|
|
389
|
+
# Offense count: 137
|
|
390
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
391
|
+
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
|
392
|
+
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
|
393
|
+
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
|
394
|
+
# FunctionalMethods: let, let!, subject, watch
|
|
395
|
+
# AllowedMethods: lambda, proc, it
|
|
396
|
+
Style/BlockDelimiters:
|
|
397
|
+
Exclude:
|
|
398
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
399
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
400
|
+
- 'lib/metaschema/markdown_doc_generator.rb'
|
|
401
|
+
- 'lib/metaschema/metapath_evaluator.rb'
|
|
402
|
+
- 'lib/metaschema/model_generator.rb'
|
|
403
|
+
|
|
404
|
+
# Offense count: 3
|
|
405
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
406
|
+
Style/CombinableLoops:
|
|
407
|
+
Exclude:
|
|
408
|
+
- 'lib/metaschema/model_generator.rb'
|
|
409
|
+
|
|
410
|
+
# Offense count: 4
|
|
411
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
412
|
+
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
|
|
413
|
+
# SupportedStyles: assign_to_condition, assign_inside_condition
|
|
414
|
+
Style/ConditionalAssignment:
|
|
415
|
+
Exclude:
|
|
416
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
417
|
+
- 'lib/metaschema/model_generator.rb'
|
|
418
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
419
|
+
|
|
420
|
+
# Offense count: 1
|
|
421
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
422
|
+
# Configuration parameters: EnforcedStyle, AllowComments.
|
|
423
|
+
# SupportedStyles: empty, nil, both
|
|
424
|
+
Style/EmptyElse:
|
|
425
|
+
Exclude:
|
|
426
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
427
|
+
|
|
428
|
+
# Offense count: 3
|
|
429
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
430
|
+
# Configuration parameters: AllowedReceivers.
|
|
431
|
+
# AllowedReceivers: Thread.current
|
|
432
|
+
Style/HashEachMethods:
|
|
433
|
+
Exclude:
|
|
434
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
435
|
+
- 'lib/metaschema/metapath_evaluator.rb'
|
|
436
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
437
|
+
|
|
438
|
+
# Offense count: 1
|
|
439
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
440
|
+
Style/HashExcept:
|
|
441
|
+
Exclude:
|
|
442
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
443
|
+
|
|
444
|
+
# Offense count: 16
|
|
445
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
446
|
+
Style/IdenticalConditionalBranches:
|
|
447
|
+
Exclude:
|
|
448
|
+
- 'lib/metaschema/model_generator.rb'
|
|
449
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
450
|
+
|
|
451
|
+
# Offense count: 3
|
|
452
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
453
|
+
Style/MapIntoArray:
|
|
454
|
+
Exclude:
|
|
455
|
+
- 'lib/metaschema/markdown_doc_generator.rb'
|
|
456
|
+
|
|
457
|
+
# Offense count: 1
|
|
458
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
459
|
+
Style/ModuleMemberExistenceCheck:
|
|
460
|
+
Exclude:
|
|
461
|
+
- 'lib/metaschema/model_generator.rb'
|
|
462
|
+
|
|
463
|
+
# Offense count: 18
|
|
464
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
465
|
+
Style/MultilineIfModifier:
|
|
466
|
+
Exclude:
|
|
467
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
468
|
+
- 'lib/metaschema/model_generator.rb'
|
|
469
|
+
|
|
470
|
+
# Offense count: 4
|
|
471
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
472
|
+
Style/MultilineTernaryOperator:
|
|
473
|
+
Exclude:
|
|
474
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
475
|
+
- 'lib/metaschema/model_generator.rb'
|
|
476
|
+
|
|
477
|
+
# Offense count: 1
|
|
478
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
479
|
+
# Configuration parameters: AllowMethodComparison, ComparisonsThreshold.
|
|
480
|
+
Style/MultipleComparison:
|
|
481
|
+
Exclude:
|
|
482
|
+
- 'lib/metaschema/model_generator.rb'
|
|
483
|
+
|
|
484
|
+
# Offense count: 6
|
|
485
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
486
|
+
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
|
|
487
|
+
# SupportedStyles: predicate, comparison
|
|
488
|
+
Style/NumericPredicate:
|
|
489
|
+
Exclude:
|
|
490
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
491
|
+
- 'lib/metaschema/markdown_doc_generator.rb'
|
|
492
|
+
- 'lib/metaschema/metapath_evaluator.rb'
|
|
493
|
+
- 'lib/metaschema/model_generator.rb'
|
|
494
|
+
|
|
495
|
+
# Offense count: 1
|
|
496
|
+
# Configuration parameters: AllowedMethods.
|
|
497
|
+
# AllowedMethods: respond_to_missing?
|
|
498
|
+
Style/OptionalBooleanParameter:
|
|
499
|
+
Exclude:
|
|
500
|
+
- 'lib/metaschema/model_generator.rb'
|
|
501
|
+
|
|
502
|
+
# Offense count: 1
|
|
503
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
504
|
+
Style/RedundantAssignment:
|
|
505
|
+
Exclude:
|
|
506
|
+
- 'lib/metaschema/metapath_evaluator.rb'
|
|
507
|
+
|
|
508
|
+
# Offense count: 1
|
|
509
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
510
|
+
# Configuration parameters: AllowedMethods.
|
|
511
|
+
# AllowedMethods: infinite?, nonzero?
|
|
512
|
+
Style/RedundantCondition:
|
|
513
|
+
Exclude:
|
|
514
|
+
- 'lib/metaschema/model_generator.rb'
|
|
515
|
+
|
|
516
|
+
# Offense count: 3
|
|
517
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
518
|
+
Style/RedundantParentheses:
|
|
519
|
+
Exclude:
|
|
520
|
+
- 'lib/metaschema/json_schema_generator.rb'
|
|
521
|
+
- 'lib/metaschema/model_generator.rb'
|
|
522
|
+
|
|
523
|
+
# Offense count: 1
|
|
524
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
525
|
+
# Configuration parameters: EnforcedStyle.
|
|
526
|
+
# SupportedStyles: implicit, explicit
|
|
527
|
+
Style/RescueStandardError:
|
|
528
|
+
Exclude:
|
|
529
|
+
- 'lib/metaschema/model_generator.rb'
|
|
530
|
+
|
|
531
|
+
# Offense count: 2
|
|
532
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
533
|
+
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
|
|
534
|
+
# AllowedMethods: present?, blank?, presence, try, try!
|
|
535
|
+
Style/SafeNavigation:
|
|
536
|
+
Exclude:
|
|
537
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
538
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
539
|
+
|
|
540
|
+
# Offense count: 1
|
|
541
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
542
|
+
Style/SlicingWithRange:
|
|
543
|
+
Exclude:
|
|
544
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
545
|
+
|
|
546
|
+
# Offense count: 1
|
|
547
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
548
|
+
# Configuration parameters: AllowModifier.
|
|
549
|
+
Style/SoleNestedConditional:
|
|
550
|
+
Exclude:
|
|
551
|
+
- 'lib/metaschema/model_generator.rb'
|
|
552
|
+
|
|
553
|
+
# Offense count: 12
|
|
554
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
555
|
+
# Configuration parameters: Mode.
|
|
556
|
+
Style/StringConcatenation:
|
|
557
|
+
Exclude:
|
|
558
|
+
- 'lib/metaschema/ruby_source_emitter.rb'
|
|
559
|
+
|
|
560
|
+
# Offense count: 4
|
|
65
561
|
# This cop supports safe autocorrection (--autocorrect).
|
|
66
562
|
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
|
67
563
|
# SupportedStyles: single_quotes, double_quotes
|
|
68
564
|
Style/StringLiterals:
|
|
69
565
|
Exclude:
|
|
70
|
-
- 'lib/metaschema.rb'
|
|
566
|
+
- 'lib/metaschema/constraint_validator.rb'
|
|
567
|
+
- 'lib/metaschema/model_generator.rb'
|
|
568
|
+
- 'spec/ruby_source_emitter_spec.rb'
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Metaschema
|
|
4
|
+
# Represents an <augment> element in a metaschema document.
|
|
5
|
+
# Augments add documentation, flags, or properties to definitions
|
|
6
|
+
# from imported modules without modifying the original module.
|
|
7
|
+
#
|
|
8
|
+
# Example:
|
|
9
|
+
# <augment name="metadata">
|
|
10
|
+
# <formal-name>Document Metadata</formal-name>
|
|
11
|
+
# <description>Provides information about the document.</description>
|
|
12
|
+
# <flag ref="document-id" />
|
|
13
|
+
# </augment>
|
|
14
|
+
class AugmentType < Lutaml::Model::Serializable
|
|
15
|
+
attribute :name, :string
|
|
16
|
+
attribute :formal_name, FormalName
|
|
17
|
+
attribute :description, MarkupLineDatatype
|
|
18
|
+
attribute :prop, PropertyType, collection: true
|
|
19
|
+
attribute :remarks, RemarksType
|
|
20
|
+
attribute :example, ExampleType, collection: true
|
|
21
|
+
attribute :flag, FlagReferenceType, collection: true
|
|
22
|
+
attribute :define_flag, InlineFlagDefinitionType, collection: true
|
|
23
|
+
|
|
24
|
+
xml do
|
|
25
|
+
element "augment"
|
|
26
|
+
ordered
|
|
27
|
+
namespace ::Metaschema::Namespace
|
|
28
|
+
|
|
29
|
+
map_attribute "name", to: :name
|
|
30
|
+
map_element "formal-name", to: :formal_name
|
|
31
|
+
map_element "description", to: :description
|
|
32
|
+
map_element "prop", to: :prop
|
|
33
|
+
map_element "remarks", to: :remarks
|
|
34
|
+
map_element "example", to: :example
|
|
35
|
+
map_element "flag", to: :flag
|
|
36
|
+
map_element "define-flag", to: :define_flag
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
data/lib/metaschema/code_type.rb
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module Metaschema
|
|
4
4
|
class CodeType < Lutaml::Model::Serializable
|
|
5
|
-
attribute :content, :string
|
|
5
|
+
attribute :content, :string, collection: true
|
|
6
6
|
attribute :klass, :string
|
|
7
7
|
attribute :a, AnchorType, collection: true
|
|
8
8
|
attribute :insert, InsertType, collection: true
|