shinkansen-transmission 2.3.4 → 2.3.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.
- package/index.d.mts +82 -102
- package/package.json +1 -1
- package/src/transmission/common/index.d.mts +7 -4
- package/src/transmission/common/index.mjs +58 -60
- package/src/transmission/from-document-to-hash/array/index.mjs +1 -1
- package/src/transmission/from-document-to-hash/boolean/index.mjs +11 -8
- package/src/transmission/from-document-to-hash/index.d.mts +4 -4
- package/src/transmission/from-document-to-hash/index.mjs +25 -53
- package/src/transmission/from-document-to-hash/null/index.mjs +11 -8
- package/src/transmission/from-document-to-hash/number/index.mjs +11 -8
- package/src/transmission/from-document-to-hash/string/index.mjs +17 -8
- package/src/transmission/from-hash-to-document/array/index.mjs +1 -1
- package/src/transmission/from-hash-to-document/index.mjs +34 -10
- package/src/transmission/from-hash-to-document/object/index.mjs +1 -1
- package/src/transmission/to-zashiki/params/index.mjs +0 -24
- package/src/transmission/to-zashiki/render/array/index.mjs +6 -18
- package/src/transmission/to-zashiki/render/boolean/index.mjs +6 -18
- package/src/transmission/to-zashiki/render/null/index.mjs +6 -18
- package/src/transmission/to-zashiki/render/number/index.mjs +6 -18
- package/src/transmission/to-zashiki/render/object/index.mjs +6 -18
- package/src/transmission/to-zashiki/render/string/index.mjs +6 -18
- package/src/transmission/to-zashiki/render-params/root-schema/index.mjs +0 -2
- package/src/transmission/to-zashiki/render-params/schema/index.mjs +0 -24
- package/src/transmission/to-zashiki/transform-schema.mjs +0 -14
@@ -18,8 +18,8 @@ import {
|
|
18
18
|
hasOneOf,
|
19
19
|
getOneOf,
|
20
20
|
getUri,
|
21
|
-
|
22
|
-
|
21
|
+
getIndexByValue,
|
22
|
+
getIndexByEqual,
|
23
23
|
transformToValue
|
24
24
|
} from '#transmission/transmission/common'
|
25
25
|
|
@@ -118,61 +118,23 @@ export function transformArray (document, schema, hash, parentUri, uri) {
|
|
118
118
|
if (hasEnum(schema)) {
|
119
119
|
const array = getEnum(schema)
|
120
120
|
|
121
|
-
hash[uri] = document.map((value) =>
|
121
|
+
hash[uri] = document.map((value) => String(getIndexByValue(array, value)))
|
122
122
|
|
123
123
|
return hash
|
124
124
|
} else {
|
125
125
|
if (hasAnyOf(schema)) {
|
126
126
|
const array = getAnyOf(schema)
|
127
127
|
|
128
|
-
hash[uri] = document.map((value) =>
|
128
|
+
hash[uri] = document.map((value) => String(getIndexByValue(array, value)))
|
129
129
|
|
130
130
|
return hash
|
131
131
|
} else {
|
132
132
|
if (hasOneOf(schema)) {
|
133
133
|
const array = getOneOf(schema)
|
134
134
|
|
135
|
-
hash[uri] = document.map((value) =>
|
135
|
+
hash[uri] = document.map((value) => String(getIndexByValue(array, value)))
|
136
136
|
|
137
137
|
return hash
|
138
|
-
} else {
|
139
|
-
const { items = {} } = schema
|
140
|
-
|
141
|
-
if (isArray(items)) {
|
142
|
-
/*
|
143
|
-
* Items is an array of schemas
|
144
|
-
*/
|
145
|
-
return transformArrayFor(document, schema, hash, parentUri) // , uri)
|
146
|
-
} else {
|
147
|
-
if (isObject(items)) {
|
148
|
-
/*
|
149
|
-
* Items is a schema
|
150
|
-
*/
|
151
|
-
if (hasEnum(items)) {
|
152
|
-
const array = getEnum(items)
|
153
|
-
|
154
|
-
hash[uri] = document.map((value) => transformValueIndexFor(array, value))
|
155
|
-
|
156
|
-
return hash
|
157
|
-
} else {
|
158
|
-
if (hasAnyOf(items)) {
|
159
|
-
const array = getAnyOf(items)
|
160
|
-
|
161
|
-
hash[uri] = document.map((value) => transformValueIndexFor(array, value))
|
162
|
-
|
163
|
-
return hash
|
164
|
-
} else {
|
165
|
-
if (hasOneOf(items)) {
|
166
|
-
const array = getOneOf(items)
|
167
|
-
|
168
|
-
hash[uri] = document.map((value) => transformValueIndexFor(array, value))
|
169
|
-
|
170
|
-
return hash
|
171
|
-
}
|
172
|
-
}
|
173
|
-
}
|
174
|
-
}
|
175
|
-
}
|
176
138
|
}
|
177
139
|
}
|
178
140
|
}
|
@@ -198,26 +160,33 @@ export function transformObject (document, schema, hash, parentUri, uri) {
|
|
198
160
|
|
199
161
|
if (hasEnum(schema)) {
|
200
162
|
const array = getEnum(schema)
|
163
|
+
const index = String(getIndexByEqual(array, document))
|
201
164
|
|
202
|
-
hash[uri] =
|
165
|
+
hash[uri] = String(index)
|
203
166
|
|
204
167
|
return hash
|
205
168
|
} else {
|
206
169
|
if (hasAnyOf(schema)) {
|
207
170
|
const array = getAnyOf(schema)
|
171
|
+
const index = String(getIndexByEqual(array, document))
|
208
172
|
|
209
|
-
hash[uri] =
|
173
|
+
hash[uri] = String(index)
|
210
174
|
|
211
175
|
return hash
|
212
176
|
} else {
|
213
177
|
if (hasOneOf(schema)) {
|
214
178
|
const array = getOneOf(schema)
|
179
|
+
const index = String(getIndexByEqual(array, document))
|
215
180
|
|
216
|
-
hash[uri] =
|
181
|
+
hash[uri] = String(index)
|
217
182
|
|
218
183
|
return hash
|
219
184
|
}
|
220
185
|
}
|
186
|
+
|
187
|
+
/**
|
188
|
+
* We don't look at `properties` here like we look at `items` in `transformArray`
|
189
|
+
*/
|
221
190
|
}
|
222
191
|
|
223
192
|
/*
|
@@ -227,7 +196,7 @@ export function transformObject (document, schema, hash, parentUri, uri) {
|
|
227
196
|
}
|
228
197
|
|
229
198
|
/**
|
230
|
-
*
|
199
|
+
* Document can be `undefined`
|
231
200
|
*
|
232
201
|
* @param {DocumentType} [document]
|
233
202
|
* @param {SchemaType} [schema]
|
@@ -263,9 +232,10 @@ export default function transform (document, schema = {}, hash = {}, parentUri =
|
|
263
232
|
* Is the schema an `enum`?
|
264
233
|
*/
|
265
234
|
if (hasEnum(schema)) {
|
266
|
-
const
|
235
|
+
const array = getEnum(schema)
|
236
|
+
const index = getIndexByValue(array, document)
|
267
237
|
|
268
|
-
hash[uri] =
|
238
|
+
hash[uri] = String(index)
|
269
239
|
|
270
240
|
return hash
|
271
241
|
} else {
|
@@ -273,9 +243,10 @@ export default function transform (document, schema = {}, hash = {}, parentUri =
|
|
273
243
|
* Is the schema an `anyOf`?
|
274
244
|
*/
|
275
245
|
if (hasAnyOf(schema)) {
|
276
|
-
const
|
246
|
+
const array = getAnyOf(schema)
|
247
|
+
const index = getIndexByValue(array, document)
|
277
248
|
|
278
|
-
hash[uri] =
|
249
|
+
hash[uri] = String(index)
|
279
250
|
|
280
251
|
return hash
|
281
252
|
} else {
|
@@ -283,9 +254,10 @@ export default function transform (document, schema = {}, hash = {}, parentUri =
|
|
283
254
|
* Is the schema an `oneOf`?
|
284
255
|
*/
|
285
256
|
if (hasOneOf(schema)) {
|
286
|
-
const
|
257
|
+
const array = getOneOf(schema)
|
258
|
+
const index = getIndexByValue(array, document)
|
287
259
|
|
288
|
-
hash[uri] =
|
260
|
+
hash[uri] = String(index)
|
289
261
|
|
290
262
|
return hash
|
291
263
|
}
|
@@ -15,7 +15,7 @@ import {
|
|
15
15
|
hasOneOf,
|
16
16
|
getOneOf,
|
17
17
|
getUri,
|
18
|
-
|
18
|
+
getIndexByValue
|
19
19
|
} from '#transmission/transmission/common'
|
20
20
|
|
21
21
|
const log = debug('shinkansen-transmission/from-document-to-hash/null')
|
@@ -23,7 +23,7 @@ const log = debug('shinkansen-transmission/from-document-to-hash/null')
|
|
23
23
|
log('`shinkansen` is awake')
|
24
24
|
|
25
25
|
/**
|
26
|
-
*
|
26
|
+
* Document can be `undefined`
|
27
27
|
*
|
28
28
|
* @param {DocumentType} [document]
|
29
29
|
* @param {SchemaType} [schema]
|
@@ -36,23 +36,26 @@ export default function transformNullSchema (document, schema = {}, hash = {}, p
|
|
36
36
|
log('transformNullSchema')
|
37
37
|
|
38
38
|
if (hasEnum(schema)) {
|
39
|
-
const
|
39
|
+
const array = getEnum(schema)
|
40
|
+
const index = getIndexByValue(array, document)
|
40
41
|
|
41
|
-
hash[uri] =
|
42
|
+
hash[uri] = String(index)
|
42
43
|
|
43
44
|
return hash
|
44
45
|
} else {
|
45
46
|
if (hasAnyOf(schema)) {
|
46
|
-
const
|
47
|
+
const array = getAnyOf(schema)
|
48
|
+
const index = getIndexByValue(array, document)
|
47
49
|
|
48
|
-
hash[uri] =
|
50
|
+
hash[uri] = String(index)
|
49
51
|
|
50
52
|
return hash
|
51
53
|
} else {
|
52
54
|
if (hasOneOf(schema)) {
|
53
|
-
const
|
55
|
+
const array = getOneOf(schema)
|
56
|
+
const index = getIndexByValue(array, document)
|
54
57
|
|
55
|
-
hash[uri] =
|
58
|
+
hash[uri] = String(index)
|
56
59
|
|
57
60
|
return hash
|
58
61
|
}
|
@@ -15,7 +15,7 @@ import {
|
|
15
15
|
hasOneOf,
|
16
16
|
getOneOf,
|
17
17
|
getUri,
|
18
|
-
|
18
|
+
getIndexByValue
|
19
19
|
} from '#transmission/transmission/common'
|
20
20
|
|
21
21
|
const log = debug('shinkansen-transmission/from-document-to-hash/number')
|
@@ -23,7 +23,7 @@ const log = debug('shinkansen-transmission/from-document-to-hash/number')
|
|
23
23
|
log('`shinkansen` is awake')
|
24
24
|
|
25
25
|
/**
|
26
|
-
*
|
26
|
+
* Document can be `undefined`
|
27
27
|
*
|
28
28
|
* @param {DocumentType} [document]
|
29
29
|
* @param {SchemaType} [schema]
|
@@ -36,23 +36,26 @@ export default function transformNumberSchema (document, schema = {}, hash = {},
|
|
36
36
|
log('transformNumberSchema')
|
37
37
|
|
38
38
|
if (hasEnum(schema)) {
|
39
|
-
const
|
39
|
+
const array = getEnum(schema)
|
40
|
+
const index = getIndexByValue(array, document)
|
40
41
|
|
41
|
-
hash[uri] =
|
42
|
+
hash[uri] = String(index)
|
42
43
|
|
43
44
|
return hash
|
44
45
|
} else {
|
45
46
|
if (hasAnyOf(schema)) {
|
46
|
-
const
|
47
|
+
const array = getAnyOf(schema)
|
48
|
+
const index = getIndexByValue(array, document)
|
47
49
|
|
48
|
-
hash[uri] =
|
50
|
+
hash[uri] = String(index)
|
49
51
|
|
50
52
|
return hash
|
51
53
|
} else {
|
52
54
|
if (hasOneOf(schema)) {
|
53
|
-
const
|
55
|
+
const array = getOneOf(schema)
|
56
|
+
const index = getIndexByValue(array, document)
|
54
57
|
|
55
|
-
hash[uri] =
|
58
|
+
hash[uri] = String(index)
|
56
59
|
|
57
60
|
return hash
|
58
61
|
}
|
@@ -15,7 +15,7 @@ import {
|
|
15
15
|
hasOneOf,
|
16
16
|
getOneOf,
|
17
17
|
getUri,
|
18
|
-
|
18
|
+
getIndexByValue
|
19
19
|
} from '#transmission/transmission/common'
|
20
20
|
|
21
21
|
const log = debug('shinkansen-transmission/from-document-to-hash/string')
|
@@ -23,7 +23,7 @@ const log = debug('shinkansen-transmission/from-document-to-hash/string')
|
|
23
23
|
log('`shinkansen` is awake')
|
24
24
|
|
25
25
|
/**
|
26
|
-
*
|
26
|
+
* Document can be `undefined`
|
27
27
|
*
|
28
28
|
* @param {DocumentType} [document]
|
29
29
|
* @param {SchemaType} [schema]
|
@@ -36,23 +36,32 @@ export default function transformStringSchema (document, schema = {}, hash = {},
|
|
36
36
|
log('transformStringSchema')
|
37
37
|
|
38
38
|
if (hasEnum(schema)) {
|
39
|
-
|
39
|
+
/**
|
40
|
+
* https://json-schema.org/draft/2019-09/json-schema-validation#rfc.section.6.1.2
|
41
|
+
*/
|
42
|
+
const array = getEnum(schema)
|
43
|
+
const index = getIndexByValue(array, document)
|
40
44
|
|
41
|
-
|
45
|
+
/**
|
46
|
+
* `document` is the string representation of an index to an item in the `enum`
|
47
|
+
*/
|
48
|
+
hash[uri] = String(index)
|
42
49
|
|
43
50
|
return hash
|
44
51
|
} else {
|
45
52
|
if (hasAnyOf(schema)) {
|
46
|
-
const
|
53
|
+
const array = getAnyOf(schema)
|
54
|
+
const index = getIndexByValue(array, document)
|
47
55
|
|
48
|
-
hash[uri] =
|
56
|
+
hash[uri] = String(index)
|
49
57
|
|
50
58
|
return hash
|
51
59
|
} else {
|
52
60
|
if (hasOneOf(schema)) {
|
53
|
-
const
|
61
|
+
const array = getOneOf(schema)
|
62
|
+
const index = getIndexByValue(array, document)
|
54
63
|
|
55
|
-
hash[uri] =
|
64
|
+
hash[uri] = String(index)
|
56
65
|
|
57
66
|
return hash
|
58
67
|
}
|
@@ -25,7 +25,7 @@ log('`shinkansen` is awake')
|
|
25
25
|
* @param {HashType} [hash]
|
26
26
|
* @param {SchemaType} [schema]
|
27
27
|
* @param {ParamsType} [params]
|
28
|
-
* @returns {DocumentType
|
28
|
+
* @returns {DocumentType}
|
29
29
|
*/
|
30
30
|
export default function transformArraySchema (hash = {}, schema = {}, params = {}) {
|
31
31
|
log('transformArraySchema')
|
@@ -85,6 +85,8 @@ export function toNumber (v) {
|
|
85
85
|
throw new Error('Invalid `number`')
|
86
86
|
}
|
87
87
|
|
88
|
+
function handleError ({ message = 'No error message defined' }) { log(message) }
|
89
|
+
|
88
90
|
export { transformToValue }
|
89
91
|
|
90
92
|
/**
|
@@ -173,8 +175,6 @@ export function transformToValueFor (document, array = []) {
|
|
173
175
|
}
|
174
176
|
|
175
177
|
throw new Error('Invalid `document`')
|
176
|
-
|
177
|
-
// return document
|
178
178
|
}
|
179
179
|
|
180
180
|
/**
|
@@ -335,8 +335,14 @@ export function transformNull (hash, schema, parentUri, uri) {
|
|
335
335
|
}
|
336
336
|
}
|
337
337
|
|
338
|
-
|
339
|
-
|
338
|
+
try {
|
339
|
+
if (isArray(document)) return document.map(toNull)
|
340
|
+
return toNull(document)
|
341
|
+
} catch (e) {
|
342
|
+
handleError(e)
|
343
|
+
}
|
344
|
+
|
345
|
+
return document
|
340
346
|
}
|
341
347
|
}
|
342
348
|
|
@@ -376,8 +382,14 @@ export function transformBoolean (hash, schema, parentUri, uri) {
|
|
376
382
|
}
|
377
383
|
}
|
378
384
|
|
379
|
-
|
380
|
-
|
385
|
+
try {
|
386
|
+
if (isArray(document)) return document.map(toBoolean)
|
387
|
+
return toBoolean(document)
|
388
|
+
} catch (e) {
|
389
|
+
handleError(e)
|
390
|
+
}
|
391
|
+
|
392
|
+
return document
|
381
393
|
}
|
382
394
|
}
|
383
395
|
|
@@ -483,8 +495,14 @@ export function transformNumber (hash, schema, parentUri, uri) {
|
|
483
495
|
}
|
484
496
|
}
|
485
497
|
|
486
|
-
|
487
|
-
|
498
|
+
try {
|
499
|
+
if (isArray(document)) return document.map(toNumber)
|
500
|
+
return toNumber(document)
|
501
|
+
} catch (e) {
|
502
|
+
handleError(e)
|
503
|
+
}
|
504
|
+
|
505
|
+
return document
|
488
506
|
}
|
489
507
|
}
|
490
508
|
|
@@ -524,8 +542,14 @@ export function transformString (hash, schema, parentUri, uri) {
|
|
524
542
|
}
|
525
543
|
}
|
526
544
|
|
527
|
-
|
528
|
-
|
545
|
+
try {
|
546
|
+
if (isArray(document)) return document.map(toString)
|
547
|
+
return toString(document)
|
548
|
+
} catch (e) {
|
549
|
+
handleError(e)
|
550
|
+
}
|
551
|
+
|
552
|
+
return document
|
529
553
|
}
|
530
554
|
}
|
531
555
|
|
@@ -25,7 +25,7 @@ log('`shinkansen` is awake')
|
|
25
25
|
* @param {HashType} [hash]
|
26
26
|
* @param {SchemaType} [schema]
|
27
27
|
* @param {ParamsType} [params]
|
28
|
-
* @returns {DocumentType
|
28
|
+
* @returns {DocumentType}
|
29
29
|
*/
|
30
30
|
export default function transformObjectSchema (hash = {}, schema = {}, params = {}) {
|
31
31
|
log('transformObjectSchema')
|
@@ -1,31 +1,7 @@
|
|
1
1
|
/**
|
2
|
-
* @typedef {TransmissionTypes.ObjectLiteralType} ObjectLiteralType
|
3
|
-
* @typedef {TransmissionTypes.ObjectType} ObjectType
|
4
|
-
*
|
5
|
-
* @typedef {TransmissionTypes.EnumType} EnumType
|
6
|
-
* @typedef {TransmissionTypes.AnyOfType} AnyOfType
|
7
|
-
* @typedef {TransmissionTypes.OneOfType} OneOfType
|
8
|
-
* @typedef {TransmissionTypes.FieldType} FieldType
|
9
|
-
*
|
10
2
|
* @typedef {TransmissionTypes.SchemaType} SchemaType
|
11
3
|
* @typedef {TransmissionTypes.ValuesType} ValuesType
|
12
4
|
* @typedef {TransmissionTypes.ParamsType} ParamsType
|
13
|
-
*
|
14
|
-
* @typedef {TransmissionTypes.Zashiki.ZashikiType} ZashikiType
|
15
|
-
*
|
16
|
-
* @typedef {TransmissionTypes.Zashiki.StringMetaType} ZashikiStringMetaType
|
17
|
-
* @typedef {TransmissionTypes.Zashiki.NumberMetaType} ZashikiNumberMetaType
|
18
|
-
* @typedef {TransmissionTypes.Zashiki.ArrayMetaType} ZashikiArrayMetaType
|
19
|
-
* @typedef {TransmissionTypes.Zashiki.ObjectMetaType} ZashikiObjectMetaType
|
20
|
-
* @typedef {TransmissionTypes.Zashiki.BooleanMetaType} ZashikiBooleanMetaType
|
21
|
-
* @typedef {TransmissionTypes.Zashiki.NullMetaType} ZashikiNullMetaType
|
22
|
-
*
|
23
|
-
* @typedef {TransmissionTypes.Zashiki.StringElementsType} ZashikiStringElementsType
|
24
|
-
* @typedef {TransmissionTypes.Zashiki.NumberElementsType} ZashikiNumberElementsType
|
25
|
-
* @typedef {TransmissionTypes.Zashiki.ArrayElementsType} ZashikiArrayElementsType
|
26
|
-
* @typedef {TransmissionTypes.Zashiki.ObjectElementsType} ZashikiObjectElementsType
|
27
|
-
* @typedef {TransmissionTypes.Zashiki.BooleanElementsType} ZashikiBooleanElementsType
|
28
|
-
* @typedef {TransmissionTypes.Zashiki.NullElementsType} ZashikiNullElementsType
|
29
5
|
*/
|
30
6
|
|
31
7
|
import debug from 'debug'
|
@@ -11,21 +11,9 @@
|
|
11
11
|
* @typedef {TransmissionTypes.ValuesType} ValuesType
|
12
12
|
* @typedef {TransmissionTypes.ParamsType} ParamsType
|
13
13
|
*
|
14
|
-
* @typedef {TransmissionTypes.Zashiki.ZashikiType} ZashikiType
|
15
|
-
*
|
16
|
-
* @typedef {TransmissionTypes.Zashiki.StringMetaType} ZashikiStringMetaType
|
17
|
-
* @typedef {TransmissionTypes.Zashiki.NumberMetaType} ZashikiNumberMetaType
|
18
14
|
* @typedef {TransmissionTypes.Zashiki.ArrayMetaType} ZashikiArrayMetaType
|
19
|
-
* @typedef {TransmissionTypes.Zashiki.ObjectMetaType} ZashikiObjectMetaType
|
20
|
-
* @typedef {TransmissionTypes.Zashiki.BooleanMetaType} ZashikiBooleanMetaType
|
21
|
-
* @typedef {TransmissionTypes.Zashiki.NullMetaType} ZashikiNullMetaType
|
22
|
-
*
|
23
|
-
* @typedef {TransmissionTypes.Zashiki.StringElementsType} ZashikiStringElementsType
|
24
|
-
* @typedef {TransmissionTypes.Zashiki.NumberElementsType} ZashikiNumberElementsType
|
25
15
|
* @typedef {TransmissionTypes.Zashiki.ArrayElementsType} ZashikiArrayElementsType
|
26
|
-
* @typedef {TransmissionTypes.Zashiki.
|
27
|
-
* @typedef {TransmissionTypes.Zashiki.BooleanElementsType} ZashikiBooleanElementsType
|
28
|
-
* @typedef {TransmissionTypes.Zashiki.NullElementsType} ZashikiNullElementsType
|
16
|
+
* @typedef {TransmissionTypes.Zashiki.ArrayType} ZashikiArrayType
|
29
17
|
*/
|
30
18
|
|
31
19
|
import debug from 'debug'
|
@@ -584,7 +572,7 @@ export function renderArrayElements (schema, params) {
|
|
584
572
|
* @param {SchemaType} schema
|
585
573
|
* @param {ValuesType} values
|
586
574
|
* @param {ParamsType} params
|
587
|
-
* @returns {
|
575
|
+
* @returns {ZashikiArrayType}
|
588
576
|
*/
|
589
577
|
export function renderArrayForEnum (schema, values, params) {
|
590
578
|
/**
|
@@ -616,7 +604,7 @@ export function renderArrayForEnum (schema, values, params) {
|
|
616
604
|
* @param {SchemaType} schema
|
617
605
|
* @param {ValuesType} values
|
618
606
|
* @param {ParamsType} params
|
619
|
-
* @returns {
|
607
|
+
* @returns {ZashikiArrayType}
|
620
608
|
*/
|
621
609
|
export function renderArrayForAnyOf (schema, values, params) {
|
622
610
|
/**
|
@@ -648,7 +636,7 @@ export function renderArrayForAnyOf (schema, values, params) {
|
|
648
636
|
* @param {SchemaType} schema
|
649
637
|
* @param {ValuesType} values
|
650
638
|
* @param {ParamsType} params
|
651
|
-
* @returns {
|
639
|
+
* @returns {ZashikiArrayType}
|
652
640
|
*/
|
653
641
|
export function renderArrayForOneOf (schema, values, params) {
|
654
642
|
/**
|
@@ -680,7 +668,7 @@ export function renderArrayForOneOf (schema, values, params) {
|
|
680
668
|
* @param {SchemaType} schema
|
681
669
|
* @param {ValuesType} values
|
682
670
|
* @param {ParamsType} params
|
683
|
-
* @returns {
|
671
|
+
* @returns {ZashikiArrayType}
|
684
672
|
*/
|
685
673
|
export function renderArrayForAllOf (schema, values, params) {
|
686
674
|
/**
|
@@ -710,7 +698,7 @@ export function renderArrayForAllOf (schema, values, params) {
|
|
710
698
|
* @param {SchemaType} schema
|
711
699
|
* @param {ValuesType} values
|
712
700
|
* @param {ParamsType} params
|
713
|
-
* @returns {
|
701
|
+
* @returns {ZashikiArrayType}
|
714
702
|
*/
|
715
703
|
export function renderArray (schema, values, params) {
|
716
704
|
/**
|
@@ -11,21 +11,9 @@
|
|
11
11
|
* @typedef {TransmissionTypes.ValuesType} ValuesType
|
12
12
|
* @typedef {TransmissionTypes.ParamsType} ParamsType
|
13
13
|
*
|
14
|
-
* @typedef {TransmissionTypes.Zashiki.ZashikiType} ZashikiType
|
15
|
-
*
|
16
|
-
* @typedef {TransmissionTypes.Zashiki.StringMetaType} ZashikiStringMetaType
|
17
|
-
* @typedef {TransmissionTypes.Zashiki.NumberMetaType} ZashikiNumberMetaType
|
18
|
-
* @typedef {TransmissionTypes.Zashiki.ArrayMetaType} ZashikiArrayMetaType
|
19
|
-
* @typedef {TransmissionTypes.Zashiki.ObjectMetaType} ZashikiObjectMetaType
|
20
14
|
* @typedef {TransmissionTypes.Zashiki.BooleanMetaType} ZashikiBooleanMetaType
|
21
|
-
* @typedef {TransmissionTypes.Zashiki.NullMetaType} ZashikiNullMetaType
|
22
|
-
*
|
23
|
-
* @typedef {TransmissionTypes.Zashiki.StringElementsType} ZashikiStringElementsType
|
24
|
-
* @typedef {TransmissionTypes.Zashiki.NumberElementsType} ZashikiNumberElementsType
|
25
|
-
* @typedef {TransmissionTypes.Zashiki.ArrayElementsType} ZashikiArrayElementsType
|
26
|
-
* @typedef {TransmissionTypes.Zashiki.ObjectElementsType} ZashikiObjectElementsType
|
27
15
|
* @typedef {TransmissionTypes.Zashiki.BooleanElementsType} ZashikiBooleanElementsType
|
28
|
-
* @typedef {TransmissionTypes.Zashiki.
|
16
|
+
* @typedef {TransmissionTypes.Zashiki.BooleanType} ZashikiBooleanType
|
29
17
|
*/
|
30
18
|
|
31
19
|
import debug from 'debug'
|
@@ -671,7 +659,7 @@ export function renderBooleanElements (schema, values, params, uri) {
|
|
671
659
|
* @param {SchemaType} schema
|
672
660
|
* @param {ValuesType} values
|
673
661
|
* @param {ParamsType} params
|
674
|
-
* @returns {
|
662
|
+
* @returns {ZashikiBooleanType}
|
675
663
|
*/
|
676
664
|
export function renderBooleanForEnum (schema, values, params) {
|
677
665
|
/**
|
@@ -697,7 +685,7 @@ export function renderBooleanForEnum (schema, values, params) {
|
|
697
685
|
* @param {SchemaType} schema
|
698
686
|
* @param {ValuesType} values
|
699
687
|
* @param {ParamsType} params
|
700
|
-
* @returns {
|
688
|
+
* @returns {ZashikiBooleanType}
|
701
689
|
*/
|
702
690
|
export function renderBooleanForAnyOf (schema, values, params) {
|
703
691
|
/**
|
@@ -723,7 +711,7 @@ export function renderBooleanForAnyOf (schema, values, params) {
|
|
723
711
|
* @param {SchemaType} schema
|
724
712
|
* @param {ValuesType} values
|
725
713
|
* @param {ParamsType} params
|
726
|
-
* @returns {
|
714
|
+
* @returns {ZashikiBooleanType}
|
727
715
|
*/
|
728
716
|
export function renderBooleanForOneOf (schema, values, params) {
|
729
717
|
/**
|
@@ -749,7 +737,7 @@ export function renderBooleanForOneOf (schema, values, params) {
|
|
749
737
|
* @param {SchemaType} schema
|
750
738
|
* @param {ValuesType} values
|
751
739
|
* @param {ParamsType} params
|
752
|
-
* @returns {
|
740
|
+
* @returns {ZashikiBooleanType}
|
753
741
|
*/
|
754
742
|
export function renderBooleanForAllOf (schema, values, params) {
|
755
743
|
/**
|
@@ -773,7 +761,7 @@ export function renderBooleanForAllOf (schema, values, params) {
|
|
773
761
|
* @param {SchemaType} schema
|
774
762
|
* @param {ValuesType} values
|
775
763
|
* @param {ParamsType} params
|
776
|
-
* @returns {
|
764
|
+
* @returns {ZashikiBooleanType}
|
777
765
|
*/
|
778
766
|
export function renderBoolean (schema, values, params) {
|
779
767
|
/**
|
@@ -11,21 +11,9 @@
|
|
11
11
|
* @typedef {TransmissionTypes.ValuesType} ValuesType
|
12
12
|
* @typedef {TransmissionTypes.ParamsType} ParamsType
|
13
13
|
*
|
14
|
-
* @typedef {TransmissionTypes.Zashiki.ZashikiType} ZashikiType
|
15
|
-
*
|
16
|
-
* @typedef {TransmissionTypes.Zashiki.StringMetaType} ZashikiStringMetaType
|
17
|
-
* @typedef {TransmissionTypes.Zashiki.NumberMetaType} ZashikiNumberMetaType
|
18
|
-
* @typedef {TransmissionTypes.Zashiki.ArrayMetaType} ZashikiArrayMetaType
|
19
|
-
* @typedef {TransmissionTypes.Zashiki.ObjectMetaType} ZashikiObjectMetaType
|
20
|
-
* @typedef {TransmissionTypes.Zashiki.BooleanMetaType} ZashikiBooleanMetaType
|
21
14
|
* @typedef {TransmissionTypes.Zashiki.NullMetaType} ZashikiNullMetaType
|
22
|
-
*
|
23
|
-
* @typedef {TransmissionTypes.Zashiki.StringElementsType} ZashikiStringElementsType
|
24
|
-
* @typedef {TransmissionTypes.Zashiki.NumberElementsType} ZashikiNumberElementsType
|
25
|
-
* @typedef {TransmissionTypes.Zashiki.ArrayElementsType} ZashikiArrayElementsType
|
26
|
-
* @typedef {TransmissionTypes.Zashiki.ObjectElementsType} ZashikiObjectElementsType
|
27
|
-
* @typedef {TransmissionTypes.Zashiki.BooleanElementsType} ZashikiBooleanElementsType
|
28
15
|
* @typedef {TransmissionTypes.Zashiki.NullElementsType} ZashikiNullElementsType
|
16
|
+
* @typedef {TransmissionTypes.Zashiki.NullType} ZashikiNullType
|
29
17
|
*/
|
30
18
|
|
31
19
|
import debug from 'debug'
|
@@ -673,7 +661,7 @@ export function renderNullElements (schema, values, params, uri) {
|
|
673
661
|
* @param {SchemaType} schema
|
674
662
|
* @param {ValuesType} values
|
675
663
|
* @param {ParamsType} params
|
676
|
-
* @returns {
|
664
|
+
* @returns {ZashikiNullType}
|
677
665
|
*/
|
678
666
|
export function renderNullForEnum (schema, values, params) {
|
679
667
|
/**
|
@@ -699,7 +687,7 @@ export function renderNullForEnum (schema, values, params) {
|
|
699
687
|
* @param {SchemaType} schema
|
700
688
|
* @param {ValuesType} values
|
701
689
|
* @param {ParamsType} params
|
702
|
-
* @returns {
|
690
|
+
* @returns {ZashikiNullType}
|
703
691
|
*/
|
704
692
|
export function renderNullForAnyOf (schema, values, params) {
|
705
693
|
/**
|
@@ -725,7 +713,7 @@ export function renderNullForAnyOf (schema, values, params) {
|
|
725
713
|
* @param {SchemaType} schema
|
726
714
|
* @param {ValuesType} values
|
727
715
|
* @param {ParamsType} params
|
728
|
-
* @returns {
|
716
|
+
* @returns {ZashikiNullType}
|
729
717
|
*/
|
730
718
|
export function renderNullForOneOf (schema, values, params) {
|
731
719
|
/**
|
@@ -751,7 +739,7 @@ export function renderNullForOneOf (schema, values, params) {
|
|
751
739
|
* @param {SchemaType} schema
|
752
740
|
* @param {ValuesType} values
|
753
741
|
* @param {ParamsType} params
|
754
|
-
* @returns {
|
742
|
+
* @returns {ZashikiNullType}
|
755
743
|
*/
|
756
744
|
export function renderNullForAllOf (schema, values, params) {
|
757
745
|
/**
|
@@ -775,7 +763,7 @@ export function renderNullForAllOf (schema, values, params) {
|
|
775
763
|
* @param {SchemaType} schema
|
776
764
|
* @param {ValuesType} values
|
777
765
|
* @param {ParamsType} params
|
778
|
-
* @returns {
|
766
|
+
* @returns {ZashikiNullType}
|
779
767
|
*/
|
780
768
|
export function renderNull (schema, values, params) {
|
781
769
|
/**
|