ts-openapi-codegen 2.0.0-beta.12 → 2.0.0-beta.13
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/dist/cli/index.js +1 -2
- package/dist/cli/previewChanges/previewChanges.d.ts.map +1 -1
- package/dist/cli/previewChanges/previewChanges.js +112 -32
- package/dist/cli/previewChanges/utils/updateOutputPaths.d.ts.map +1 -1
- package/dist/cli/previewChanges/utils/updateOutputPaths.js +6 -0
- package/dist/common/VersionedSchema/Utils/__mocks__/compatibilityCases.d.ts.map +1 -1
- package/dist/common/VersionedSchema/Utils/__mocks__/compatibilityCases.js +13 -0
- package/dist/common/VersionedSchema/Utils/__tests__/allUtils.test.d.ts +2 -0
- package/dist/common/VersionedSchema/Utils/__tests__/allUtils.test.d.ts.map +1 -0
- package/dist/common/VersionedSchema/Utils/__tests__/allUtils.test.js +185 -0
- package/dist/common/VersionedSchema/Utils/__tests__/compareShapes.test.js +20 -3
- package/dist/common/VersionedSchema/Utils/getUniqueKeysFromSchemas.d.ts +1 -1
- package/dist/common/VersionedSchema/Utils/getUniqueKeysFromSchemas.js +1 -1
- package/dist/core/types/base/Templates.model.d.ts +1 -1
- package/dist/core/types/base/Templates.model.d.ts.map +1 -1
- package/dist/core/utils/registerHandlebarTemplates.d.ts.map +1 -1
- package/dist/core/utils/registerHandlebarTemplates.js +42 -41
- package/dist/templatesCompiled/client/exportClient.js +1 -1
- package/dist/templatesCompiled/client/exportSchema.d.ts +5 -1
- package/dist/templatesCompiled/client/exportSchema.d.ts.map +1 -1
- package/dist/templatesCompiled/client/exportSchema.js +37 -7
- package/dist/templatesCompiled/client/joi/exportSchema.js +3 -3
- package/dist/templatesCompiled/client/joi/partials/joiSchema.js +7 -7
- package/dist/templatesCompiled/client/joi/partials/joiSchemaComposition.js +4 -4
- package/dist/templatesCompiled/client/joi/partials/joiSchemaInterface.js +3 -3
- package/dist/templatesCompiled/client/jsonschema/exportSchema.js +3 -3
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchema.js +7 -7
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaArray.js +5 -5
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaComposition.js +2 -2
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaDictionary.js +5 -5
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaInterface.js +2 -2
- package/dist/templatesCompiled/client/yup/exportSchema.js +1 -1
- package/dist/templatesCompiled/client/yup/partials/yupSchema.js +7 -7
- package/dist/templatesCompiled/client/yup/partials/yupSchemaComposition.js +4 -4
- package/dist/templatesCompiled/client/yup/partials/yupSchemaInterface.js +3 -3
- package/dist/templatesCompiled/client/zod/exportSchema.js +1 -1
- package/dist/templatesCompiled/client/zod/partials/zodSchema.js +7 -7
- package/dist/templatesCompiled/client/zod/partials/zodSchemaArray.js +8 -8
- package/dist/templatesCompiled/client/zod/partials/zodSchemaComposition.js +9 -9
- package/dist/templatesCompiled/client/zod/partials/zodSchemaDictionary.js +4 -4
- package/dist/templatesCompiled/client/zod/partials/zodSchemaInterface.js +3 -3
- package/package.json +2 -2
|
@@ -89,6 +89,7 @@ const getResponseHeader_4 = __importDefault(require("../../templatesCompiled/cli
|
|
|
89
89
|
const request_5 = __importDefault(require("../../templatesCompiled/client/core/xhr/request"));
|
|
90
90
|
const sendRequest_4 = __importDefault(require("../../templatesCompiled/client/core/xhr/sendRequest"));
|
|
91
91
|
const exportClient_1 = __importDefault(require("../../templatesCompiled/client/exportClient"));
|
|
92
|
+
const exportSchema_1 = __importDefault(require("../../templatesCompiled/client/exportSchema"));
|
|
92
93
|
const exportModel_1 = __importDefault(require("../../templatesCompiled/client/exportModel"));
|
|
93
94
|
const exportService_1 = __importDefault(require("../../templatesCompiled/client/exportService"));
|
|
94
95
|
const indexFull_1 = __importDefault(require("../../templatesCompiled/client/indexFull"));
|
|
@@ -130,7 +131,7 @@ const typeReference_1 = __importDefault(require("../../templatesCompiled/client/
|
|
|
130
131
|
const typeUnion_1 = __importDefault(require("../../templatesCompiled/client/partials/typeUnion"));
|
|
131
132
|
const registerHandlebarHelpers_1 = require("./registerHandlebarHelpers");
|
|
132
133
|
const ValidationLibrary_enum_1 = require("../types/enums/ValidationLibrary.enum");
|
|
133
|
-
const
|
|
134
|
+
const exportSchema_2 = __importDefault(require("../../templatesCompiled/client/zod/exportSchema"));
|
|
134
135
|
const zodSchema_1 = __importDefault(require("../../templatesCompiled/client/zod/partials/zodSchema"));
|
|
135
136
|
const zodSchemaInterface_1 = __importDefault(require("../../templatesCompiled/client/zod/partials/zodSchemaInterface"));
|
|
136
137
|
const zodSchemaEnum_1 = __importDefault(require("../../templatesCompiled/client/zod/partials/zodSchemaEnum"));
|
|
@@ -139,7 +140,7 @@ const zodSchemaDictionary_1 = __importDefault(require("../../templatesCompiled/c
|
|
|
139
140
|
const zodSchemaGeneric_1 = __importDefault(require("../../templatesCompiled/client/zod/partials/zodSchemaGeneric"));
|
|
140
141
|
const zodSchemaReference_1 = __importDefault(require("../../templatesCompiled/client/zod/partials/zodSchemaReference"));
|
|
141
142
|
const zodSchemaComposition_1 = __importDefault(require("../../templatesCompiled/client/zod/partials/zodSchemaComposition"));
|
|
142
|
-
const
|
|
143
|
+
const exportSchema_3 = __importDefault(require("../../templatesCompiled/client/yup/exportSchema"));
|
|
143
144
|
const yupSchema_1 = __importDefault(require("../../templatesCompiled/client/yup/partials/yupSchema"));
|
|
144
145
|
const yupSchemaInterface_1 = __importDefault(require("../../templatesCompiled/client/yup/partials/yupSchemaInterface"));
|
|
145
146
|
const yupSchemaEnum_1 = __importDefault(require("../../templatesCompiled/client/yup/partials/yupSchemaEnum"));
|
|
@@ -148,7 +149,7 @@ const yupSchemaDictionary_1 = __importDefault(require("../../templatesCompiled/c
|
|
|
148
149
|
const yupSchemaGeneric_1 = __importDefault(require("../../templatesCompiled/client/yup/partials/yupSchemaGeneric"));
|
|
149
150
|
const yupSchemaReference_1 = __importDefault(require("../../templatesCompiled/client/yup/partials/yupSchemaReference"));
|
|
150
151
|
const yupSchemaComposition_1 = __importDefault(require("../../templatesCompiled/client/yup/partials/yupSchemaComposition"));
|
|
151
|
-
const
|
|
152
|
+
const exportSchema_4 = __importDefault(require("../../templatesCompiled/client/joi/exportSchema"));
|
|
152
153
|
const joiSchema_1 = __importDefault(require("../../templatesCompiled/client/joi/partials/joiSchema"));
|
|
153
154
|
const joiSchemaInterface_1 = __importDefault(require("../../templatesCompiled/client/joi/partials/joiSchemaInterface"));
|
|
154
155
|
const joiSchemaEnum_1 = __importDefault(require("../../templatesCompiled/client/joi/partials/joiSchemaEnum"));
|
|
@@ -157,7 +158,7 @@ const joiSchemaDictionary_1 = __importDefault(require("../../templatesCompiled/c
|
|
|
157
158
|
const joiSchemaGeneric_1 = __importDefault(require("../../templatesCompiled/client/joi/partials/joiSchemaGeneric"));
|
|
158
159
|
const joiSchemaReference_1 = __importDefault(require("../../templatesCompiled/client/joi/partials/joiSchemaReference"));
|
|
159
160
|
const joiSchemaComposition_1 = __importDefault(require("../../templatesCompiled/client/joi/partials/joiSchemaComposition"));
|
|
160
|
-
const
|
|
161
|
+
const exportSchema_5 = __importDefault(require("../../templatesCompiled/client/jsonschema/exportSchema"));
|
|
161
162
|
const jsonschemaSchema_1 = __importDefault(require("../../templatesCompiled/client/jsonschema/partials/jsonschemaSchema"));
|
|
162
163
|
const jsonschemaSchemaInterface_1 = __importDefault(require("../../templatesCompiled/client/jsonschema/partials/jsonschemaSchemaInterface"));
|
|
163
164
|
const jsonschemaSchemaEnum_1 = __importDefault(require("../../templatesCompiled/client/jsonschema/partials/jsonschemaSchemaEnum"));
|
|
@@ -185,7 +186,7 @@ function registerHandlebarTemplates(root) {
|
|
|
185
186
|
exports: {
|
|
186
187
|
client: Handlebars.template(exportClient_1.default),
|
|
187
188
|
model: Handlebars.template(exportModel_1.default),
|
|
188
|
-
schema:
|
|
189
|
+
schema: Handlebars.template(exportSchema_1.default),
|
|
189
190
|
service: Handlebars.template(exportService_1.default),
|
|
190
191
|
},
|
|
191
192
|
core: {
|
|
@@ -277,50 +278,50 @@ function registerHandlebarTemplates(root) {
|
|
|
277
278
|
Handlebars.registerPartial('axios/request', Handlebars.template(request_1.default));
|
|
278
279
|
// Register Zod partials if validationLibrary is ZOD
|
|
279
280
|
if (root?.validationLibrary === ValidationLibrary_enum_1.ValidationLibrary.ZOD) {
|
|
280
|
-
|
|
281
|
-
Handlebars.registerPartial('zodSchema', Handlebars.template(zodSchema_1.default));
|
|
282
|
-
Handlebars.registerPartial('zodSchemaInterface', Handlebars.template(zodSchemaInterface_1.default));
|
|
283
|
-
Handlebars.registerPartial('zodSchemaEnum', Handlebars.template(zodSchemaEnum_1.default));
|
|
284
|
-
Handlebars.registerPartial('zodSchemaArray', Handlebars.template(zodSchemaArray_1.default));
|
|
285
|
-
Handlebars.registerPartial('zodSchemaDictionary', Handlebars.template(zodSchemaDictionary_1.default));
|
|
286
|
-
Handlebars.registerPartial('zodSchemaGeneric', Handlebars.template(zodSchemaGeneric_1.default));
|
|
287
|
-
Handlebars.registerPartial('zodSchemaReference', Handlebars.template(zodSchemaReference_1.default));
|
|
288
|
-
Handlebars.registerPartial('zodSchemaComposition', Handlebars.template(zodSchemaComposition_1.default));
|
|
281
|
+
Handlebars.registerPartial('zod/exportSchema', Handlebars.template(exportSchema_2.default));
|
|
282
|
+
Handlebars.registerPartial('zod/zodSchema', Handlebars.template(zodSchema_1.default));
|
|
283
|
+
Handlebars.registerPartial('zod/zodSchemaInterface', Handlebars.template(zodSchemaInterface_1.default));
|
|
284
|
+
Handlebars.registerPartial('zod/zodSchemaEnum', Handlebars.template(zodSchemaEnum_1.default));
|
|
285
|
+
Handlebars.registerPartial('zod/zodSchemaArray', Handlebars.template(zodSchemaArray_1.default));
|
|
286
|
+
Handlebars.registerPartial('zod/zodSchemaDictionary', Handlebars.template(zodSchemaDictionary_1.default));
|
|
287
|
+
Handlebars.registerPartial('zod/zodSchemaGeneric', Handlebars.template(zodSchemaGeneric_1.default));
|
|
288
|
+
Handlebars.registerPartial('zod/zodSchemaReference', Handlebars.template(zodSchemaReference_1.default));
|
|
289
|
+
Handlebars.registerPartial('zod/zodSchemaComposition', Handlebars.template(zodSchemaComposition_1.default));
|
|
289
290
|
}
|
|
290
291
|
// Register Yup partials if validationLibrary is YUP
|
|
291
292
|
if (root?.validationLibrary === ValidationLibrary_enum_1.ValidationLibrary.YUP) {
|
|
292
|
-
|
|
293
|
-
Handlebars.registerPartial('yupSchema', Handlebars.template(yupSchema_1.default));
|
|
294
|
-
Handlebars.registerPartial('yupSchemaInterface', Handlebars.template(yupSchemaInterface_1.default));
|
|
295
|
-
Handlebars.registerPartial('yupSchemaEnum', Handlebars.template(yupSchemaEnum_1.default));
|
|
296
|
-
Handlebars.registerPartial('yupSchemaArray', Handlebars.template(yupSchemaArray_1.default));
|
|
297
|
-
Handlebars.registerPartial('yupSchemaDictionary', Handlebars.template(yupSchemaDictionary_1.default));
|
|
298
|
-
Handlebars.registerPartial('yupSchemaGeneric', Handlebars.template(yupSchemaGeneric_1.default));
|
|
299
|
-
Handlebars.registerPartial('yupSchemaReference', Handlebars.template(yupSchemaReference_1.default));
|
|
300
|
-
Handlebars.registerPartial('yupSchemaComposition', Handlebars.template(yupSchemaComposition_1.default));
|
|
293
|
+
Handlebars.registerPartial('yup/exportSchema', Handlebars.template(exportSchema_3.default));
|
|
294
|
+
Handlebars.registerPartial('yup/yupSchema', Handlebars.template(yupSchema_1.default));
|
|
295
|
+
Handlebars.registerPartial('yup/yupSchemaInterface', Handlebars.template(yupSchemaInterface_1.default));
|
|
296
|
+
Handlebars.registerPartial('yup/yupSchemaEnum', Handlebars.template(yupSchemaEnum_1.default));
|
|
297
|
+
Handlebars.registerPartial('yup/yupSchemaArray', Handlebars.template(yupSchemaArray_1.default));
|
|
298
|
+
Handlebars.registerPartial('yup/yupSchemaDictionary', Handlebars.template(yupSchemaDictionary_1.default));
|
|
299
|
+
Handlebars.registerPartial('yup/yupSchemaGeneric', Handlebars.template(yupSchemaGeneric_1.default));
|
|
300
|
+
Handlebars.registerPartial('yup/yupSchemaReference', Handlebars.template(yupSchemaReference_1.default));
|
|
301
|
+
Handlebars.registerPartial('yup/yupSchemaComposition', Handlebars.template(yupSchemaComposition_1.default));
|
|
301
302
|
}
|
|
302
303
|
// Register Joi partials if validationLibrary is JOI
|
|
303
304
|
if (root?.validationLibrary === ValidationLibrary_enum_1.ValidationLibrary.JOI) {
|
|
304
|
-
|
|
305
|
-
Handlebars.registerPartial('joiSchema', Handlebars.template(joiSchema_1.default));
|
|
306
|
-
Handlebars.registerPartial('joiSchemaInterface', Handlebars.template(joiSchemaInterface_1.default));
|
|
307
|
-
Handlebars.registerPartial('joiSchemaEnum', Handlebars.template(joiSchemaEnum_1.default));
|
|
308
|
-
Handlebars.registerPartial('joiSchemaArray', Handlebars.template(joiSchemaArray_1.default));
|
|
309
|
-
Handlebars.registerPartial('joiSchemaDictionary', Handlebars.template(joiSchemaDictionary_1.default));
|
|
310
|
-
Handlebars.registerPartial('joiSchemaGeneric', Handlebars.template(joiSchemaGeneric_1.default));
|
|
311
|
-
Handlebars.registerPartial('joiSchemaReference', Handlebars.template(joiSchemaReference_1.default));
|
|
312
|
-
Handlebars.registerPartial('joiSchemaComposition', Handlebars.template(joiSchemaComposition_1.default));
|
|
305
|
+
Handlebars.registerPartial('joi/exportSchema', Handlebars.template(exportSchema_4.default));
|
|
306
|
+
Handlebars.registerPartial('joi/joiSchema', Handlebars.template(joiSchema_1.default));
|
|
307
|
+
Handlebars.registerPartial('joi/joiSchemaInterface', Handlebars.template(joiSchemaInterface_1.default));
|
|
308
|
+
Handlebars.registerPartial('joi/joiSchemaEnum', Handlebars.template(joiSchemaEnum_1.default));
|
|
309
|
+
Handlebars.registerPartial('joi/joiSchemaArray', Handlebars.template(joiSchemaArray_1.default));
|
|
310
|
+
Handlebars.registerPartial('joi/joiSchemaDictionary', Handlebars.template(joiSchemaDictionary_1.default));
|
|
311
|
+
Handlebars.registerPartial('joi/joiSchemaGeneric', Handlebars.template(joiSchemaGeneric_1.default));
|
|
312
|
+
Handlebars.registerPartial('joi/joiSchemaReference', Handlebars.template(joiSchemaReference_1.default));
|
|
313
|
+
Handlebars.registerPartial('joi/joiSchemaComposition', Handlebars.template(joiSchemaComposition_1.default));
|
|
313
314
|
}
|
|
314
315
|
if (root.validationLibrary === ValidationLibrary_enum_1.ValidationLibrary.JSONSCHEMA) {
|
|
315
|
-
|
|
316
|
-
Handlebars.registerPartial('jsonschemaSchema', Handlebars.template(jsonschemaSchema_1.default));
|
|
317
|
-
Handlebars.registerPartial('jsonschemaSchemaInterface', Handlebars.template(jsonschemaSchemaInterface_1.default));
|
|
318
|
-
Handlebars.registerPartial('jsonschemaSchemaEnum', Handlebars.template(jsonschemaSchemaEnum_1.default));
|
|
319
|
-
Handlebars.registerPartial('jsonschemaSchemaArray', Handlebars.template(jsonschemaSchemaArray_1.default));
|
|
320
|
-
Handlebars.registerPartial('jsonschemaSchemaDictionary', Handlebars.template(jsonschemaSchemaDictionary_1.default));
|
|
321
|
-
Handlebars.registerPartial('jsonschemaSchemaGeneric', Handlebars.template(jsonschemaSchemaGeneric_1.default));
|
|
322
|
-
Handlebars.registerPartial('jsonschemaSchemaReference', Handlebars.template(jsonschemaSchemaReference_1.default));
|
|
323
|
-
Handlebars.registerPartial('jsonschemaSchemaComposition', Handlebars.template(jsonschemaSchemaComposition_1.default));
|
|
316
|
+
Handlebars.registerPartial('jsonschema/exportSchema', Handlebars.template(exportSchema_5.default));
|
|
317
|
+
Handlebars.registerPartial('jsonschema/jsonschemaSchema', Handlebars.template(jsonschemaSchema_1.default));
|
|
318
|
+
Handlebars.registerPartial('jsonschema/jsonschemaSchemaInterface', Handlebars.template(jsonschemaSchemaInterface_1.default));
|
|
319
|
+
Handlebars.registerPartial('jsonschema/jsonschemaSchemaEnum', Handlebars.template(jsonschemaSchemaEnum_1.default));
|
|
320
|
+
Handlebars.registerPartial('jsonschema/jsonschemaSchemaArray', Handlebars.template(jsonschemaSchemaArray_1.default));
|
|
321
|
+
Handlebars.registerPartial('jsonschema/jsonschemaSchemaDictionary', Handlebars.template(jsonschemaSchemaDictionary_1.default));
|
|
322
|
+
Handlebars.registerPartial('jsonschema/jsonschemaSchemaGeneric', Handlebars.template(jsonschemaSchemaGeneric_1.default));
|
|
323
|
+
Handlebars.registerPartial('jsonschema/jsonschemaSchemaReference', Handlebars.template(jsonschemaSchemaReference_1.default));
|
|
324
|
+
Handlebars.registerPartial('jsonschema/jsonschemaSchemaComposition', Handlebars.template(jsonschemaSchemaComposition_1.default));
|
|
324
325
|
}
|
|
325
326
|
return templates;
|
|
326
327
|
}
|
|
@@ -47,7 +47,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
47
47
|
+ ((stack1 = lookupProperty(helpers, "joinPath").call(alias1, lookupProperty(lookupProperty(data, "root"), "outputCore"), "./interceptors/apiErrorInterceptor", { "name": "joinPath", "hash": {}, "data": data, "loc": { "start": { "line": 8, "column": 37 }, "end": { "line": 8, "column": 105 } } })) != null ? stack1 : "")
|
|
48
48
|
+ "';\n\n"
|
|
49
49
|
+ ((stack1 = lookupProperty(helpers, "each").call(alias1, lookupProperty(depth0, "services"), { "name": "each", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 12, "column": 9 } } })) != null ? stack1 : "")
|
|
50
|
-
+ "\nexport interface ClientOptions
|
|
50
|
+
+ "\nexport interface ClientOptions {\n openApi?: Partial<TOpenAPIConfig>;\n interceptors?: {\n onRequest?: RequestInterceptor[];\n onResponse?: ResponseInterceptor[];\n onError?: ErrorInterceptor[];\n }\n}\n\nexport function createClient<TExecutorOptions extends Record<string, any>>(\n options: ClientOptions = {},\n) {\n const openApiConfig: TOpenAPIConfig = {\n ...OpenAPI,\n ...options.openApi,\n };\n\n let executor = createExecutorAdapter<TExecutorOptions>(openApiConfig);\n if (options?.interceptors) {\n executor = withInterceptors(executor, {\n onError: [apiErrorInterceptor, ...(options.interceptors?.onError ?? [])],\n onRequest: options.interceptors?.onRequest,\n onResponse: options.interceptors?.onResponse,\n });\n }\n\n return {\n"
|
|
51
51
|
+ ((stack1 = lookupProperty(helpers, "each").call(alias1, lookupProperty(depth0, "services"), { "name": "each", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 41, "column": 4 }, "end": { "line": 43, "column": 13 } } })) != null ? stack1 : "")
|
|
52
52
|
+ " };\n}\n";
|
|
53
53
|
}, "usePartial": true, "useData": true };
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
+
"1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
3
|
+
"3": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
4
|
+
"5": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
5
|
+
"7": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
2
6
|
compiler: (string | number)[];
|
|
3
|
-
main: (container: any, depth0: any, helpers: any, partials: any, data: any) =>
|
|
7
|
+
main: (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
|
|
4
8
|
usePartial: boolean;
|
|
5
9
|
useData: boolean;
|
|
6
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exportSchema.d.ts","sourceRoot":"","sources":["../../../src/templatesCompiled/client/exportSchema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"exportSchema.d.ts","sourceRoot":"","sources":["../../../src/templatesCompiled/client/exportSchema.ts"],"names":[],"mappings":";;;;;;;;;;AAMA,wBAgDmC"}
|
|
@@ -6,17 +6,47 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
/* tslint: disable */
|
|
7
7
|
/* eslint: disable */
|
|
8
8
|
// @ts-nocheck
|
|
9
|
-
exports.default = { "
|
|
9
|
+
exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
10
10
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
11
11
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
12
12
|
return parent[propertyName];
|
|
13
13
|
}
|
|
14
14
|
return undefined;
|
|
15
15
|
};
|
|
16
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "zod/exportSchema"), depth0, { "name": "zod/exportSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
17
|
+
}, "3": function (container, depth0, helpers, partials, data) {
|
|
18
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
19
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
20
|
+
return parent[propertyName];
|
|
21
|
+
}
|
|
22
|
+
return undefined;
|
|
23
|
+
};
|
|
24
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "joi/exportSchema"), depth0, { "name": "joi/exportSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
25
|
+
}, "5": function (container, depth0, helpers, partials, data) {
|
|
26
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
27
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
28
|
+
return parent[propertyName];
|
|
29
|
+
}
|
|
30
|
+
return undefined;
|
|
31
|
+
};
|
|
32
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "yup/exportSchema"), depth0, { "name": "yup/exportSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
33
|
+
}, "7": function (container, depth0, helpers, partials, data) {
|
|
34
|
+
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
35
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
36
|
+
return parent[propertyName];
|
|
37
|
+
}
|
|
38
|
+
return undefined;
|
|
39
|
+
};
|
|
40
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschema/exportSchema"), depth0, { "name": "jsonschema/exportSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
41
|
+
}, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
42
|
+
var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
43
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
44
|
+
return parent[propertyName];
|
|
45
|
+
}
|
|
46
|
+
return undefined;
|
|
47
|
+
};
|
|
48
|
+
return ((stack1 = lookupProperty(helpers, "equals").call(alias1, lookupProperty(lookupProperty(data, "root"), "validationLibrary"), "zod", { "name": "equals", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 75 } } })) != null ? stack1 : "")
|
|
49
|
+
+ ((stack1 = lookupProperty(helpers, "equals").call(alias1, lookupProperty(lookupProperty(data, "root"), "validationLibrary"), "joi", { "name": "equals", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 75 } } })) != null ? stack1 : "")
|
|
50
|
+
+ ((stack1 = lookupProperty(helpers, "equals").call(alias1, lookupProperty(lookupProperty(data, "root"), "validationLibrary"), "yup", { "name": "equals", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 75 } } })) != null ? stack1 : "")
|
|
51
|
+
+ ((stack1 = lookupProperty(helpers, "equals").call(alias1, lookupProperty(lookupProperty(data, "root"), "validationLibrary"), "jsonschema", { "name": "equals", "hash": {}, "fn": container.program(7, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 89 } } })) != null ? stack1 : "");
|
|
22
52
|
}, "usePartial": true, "useData": true };
|
|
@@ -46,11 +46,11 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
46
46
|
+ "\nimport Joi from 'joi';\n\nexport const "
|
|
47
47
|
+ ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 20 } }), depth0)) != null ? stack1 : "")
|
|
48
48
|
+ "Schema = "
|
|
49
|
-
+ ((stack1 = container.invokePartial(lookupProperty(partials, "joiSchema"), depth0, { "name": "joiSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
49
|
+
+ ((stack1 = container.invokePartial(lookupProperty(partials, "joi/joiSchema"), depth0, { "name": "joi/joiSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
50
50
|
+ ";\n\nexport type "
|
|
51
51
|
+ ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 13, "column": 15 }, "end": { "line": 13, "column": 19 } }), depth0)) != null ? stack1 : "")
|
|
52
|
-
+ " = Joi.
|
|
53
|
-
+ ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 13, "column":
|
|
52
|
+
+ " = Joi.Schema<typeof "
|
|
53
|
+
+ ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 13, "column": 46 }, "end": { "line": 13, "column": 50 } }), depth0)) != null ? stack1 : "")
|
|
54
54
|
+ "Schema>;\n\nexport function validate"
|
|
55
55
|
+ ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 15, "column": 27 }, "end": { "line": 15, "column": 31 } }), depth0)) != null ? stack1 : "")
|
|
56
56
|
+ "(data: unknown): { value: "
|
|
@@ -13,7 +13,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
13
13
|
}
|
|
14
14
|
return undefined;
|
|
15
15
|
};
|
|
16
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "joiSchemaInterface"), depth0, { "name": "joiSchemaInterface", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
16
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "joi/joiSchemaInterface"), depth0, { "name": "joi/joiSchemaInterface", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
17
17
|
}, "3": function (container, depth0, helpers, partials, data) {
|
|
18
18
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
19
19
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -29,7 +29,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
29
29
|
}
|
|
30
30
|
return undefined;
|
|
31
31
|
};
|
|
32
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "joiSchemaEnum"), depth0, { "name": "joiSchemaEnum", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
32
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "joi/joiSchemaEnum"), depth0, { "name": "joi/joiSchemaEnum", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
33
33
|
}, "6": function (container, depth0, helpers, partials, data) {
|
|
34
34
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
35
35
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -45,7 +45,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
45
45
|
}
|
|
46
46
|
return undefined;
|
|
47
47
|
};
|
|
48
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "joiSchemaArray"), depth0, { "name": "joiSchemaArray", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
48
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "joi/joiSchemaArray"), depth0, { "name": "joi/joiSchemaArray", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
49
49
|
}, "9": function (container, depth0, helpers, partials, data) {
|
|
50
50
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
51
51
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -61,7 +61,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
61
61
|
}
|
|
62
62
|
return undefined;
|
|
63
63
|
};
|
|
64
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "joiSchemaDictionary"), depth0, { "name": "joiSchemaDictionary", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
64
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "joi/joiSchemaDictionary"), depth0, { "name": "joi/joiSchemaDictionary", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
65
65
|
}, "12": function (container, depth0, helpers, partials, data) {
|
|
66
66
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
67
67
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -77,7 +77,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
77
77
|
}
|
|
78
78
|
return undefined;
|
|
79
79
|
};
|
|
80
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "joiSchemaComposition"), depth0, { "name": "joiSchemaComposition", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
80
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "joi/joiSchemaComposition"), depth0, { "name": "joi/joiSchemaComposition", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
81
81
|
}, "15": function (container, depth0, helpers, partials, data) {
|
|
82
82
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
83
83
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -109,7 +109,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
109
109
|
}
|
|
110
110
|
return undefined;
|
|
111
111
|
};
|
|
112
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "joiSchemaReference"), depth0, { "name": "joiSchemaReference", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
112
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "joi/joiSchemaReference"), depth0, { "name": "joi/joiSchemaReference", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
113
113
|
}, "20": function (container, depth0, helpers, partials, data) {
|
|
114
114
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
115
115
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -117,7 +117,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
117
117
|
}
|
|
118
118
|
return undefined;
|
|
119
119
|
};
|
|
120
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "joiSchemaGeneric"), depth0, { "name": "joiSchemaGeneric", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
120
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "joi/joiSchemaGeneric"), depth0, { "name": "joi/joiSchemaGeneric", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
121
121
|
}, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
122
122
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
123
123
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -26,8 +26,8 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
26
26
|
return undefined;
|
|
27
27
|
};
|
|
28
28
|
return " "
|
|
29
|
-
+ ((stack1 = container.invokePartial(lookupProperty(partials, "joiSchema"), depth0, { "name": "joiSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
30
|
-
+ ((stack1 = lookupProperty(helpers, "unless").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column":
|
|
29
|
+
+ ((stack1 = container.invokePartial(lookupProperty(partials, "joi/joiSchema"), depth0, { "name": "joi/joiSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
30
|
+
+ ((stack1 = lookupProperty(helpers, "unless").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 22 }, "end": { "line": 4, "column": 51 } } })) != null ? stack1 : "")
|
|
31
31
|
+ "\n";
|
|
32
32
|
}, "3": function (container, depth0, helpers, partials, data) {
|
|
33
33
|
return ",";
|
|
@@ -74,7 +74,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
74
74
|
}
|
|
75
75
|
return undefined;
|
|
76
76
|
};
|
|
77
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "joiSchema"), depth0, { "name": "joiSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
77
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "joi/joiSchema"), depth0, { "name": "joi/joiSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
78
78
|
}, "13": function (container, depth0, helpers, partials, data) {
|
|
79
79
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
80
80
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -83,7 +83,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
83
83
|
return undefined;
|
|
84
84
|
};
|
|
85
85
|
return ".concat("
|
|
86
|
-
+ ((stack1 = container.invokePartial(lookupProperty(partials, "joiSchema"), depth0, { "name": "joiSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
86
|
+
+ ((stack1 = container.invokePartial(lookupProperty(partials, "joi/joiSchema"), depth0, { "name": "joi/joiSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
87
87
|
+ ")\n";
|
|
88
88
|
}, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
89
89
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
@@ -28,9 +28,9 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
28
28
|
return " "
|
|
29
29
|
+ ((stack1 = container.lambda(container.strict(depth0, "name", { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 11 } }), depth0)) != null ? stack1 : "")
|
|
30
30
|
+ ": "
|
|
31
|
-
+ ((stack1 = container.invokePartial(lookupProperty(partials, "joiSchema"), depth0, { "name": "joiSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
32
|
-
+ ((stack1 = lookupProperty(helpers, "unless").call(alias1, lookupProperty(depth0, "isRequired"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column":
|
|
33
|
-
+ ((stack1 = lookupProperty(helpers, "unless").call(alias1, lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column":
|
|
31
|
+
+ ((stack1 = container.invokePartial(lookupProperty(partials, "joi/joiSchema"), depth0, { "name": "joi/joiSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
32
|
+
+ ((stack1 = lookupProperty(helpers, "unless").call(alias1, lookupProperty(depth0, "isRequired"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 34 }, "end": { "line": 4, "column": 78 } } })) != null ? stack1 : "")
|
|
33
|
+
+ ((stack1 = lookupProperty(helpers, "unless").call(alias1, lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 78 }, "end": { "line": 4, "column": 107 } } })) != null ? stack1 : "")
|
|
34
34
|
+ "\n";
|
|
35
35
|
}, "3": function (container, depth0, helpers, partials, data) {
|
|
36
36
|
return ".optional()";
|
|
@@ -43,17 +43,17 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
43
43
|
return ((stack1 = container.invokePartial(lookupProperty(partials, "header"), depth0, { "name": "header", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
44
44
|
+ "\n"
|
|
45
45
|
+ ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "imports"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 7, "column": 7 } } })) != null ? stack1 : "")
|
|
46
|
-
+ "\nimport Ajv from 'ajv';\nimport addFormats from 'ajv-formats';\n\nconst ajv = new Ajv({ allErrors: true });\naddFormats(ajv);\n\nexport const "
|
|
46
|
+
+ "\nimport Ajv, { ErrorObject } from 'ajv';\nimport addFormats from 'ajv-formats';\n\nconst ajv = new Ajv({ allErrors: true });\naddFormats(ajv);\n\nexport const "
|
|
47
47
|
+ ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 15, "column": 16 }, "end": { "line": 15, "column": 20 } }), depth0)) != null ? stack1 : "")
|
|
48
48
|
+ "Schema = "
|
|
49
|
-
+ ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschemaSchema"), depth0, { "name": "jsonschemaSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
49
|
+
+ ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschema/jsonschemaSchema"), depth0, { "name": "jsonschema/jsonschemaSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
50
50
|
+ ";\n\nexport type "
|
|
51
51
|
+ ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 19 } }), depth0)) != null ? stack1 : "")
|
|
52
52
|
+ " = any; // JSON Schema doesn't provide type inference\n\nexport function validate"
|
|
53
53
|
+ ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 19, "column": 27 }, "end": { "line": 19, "column": 31 } }), depth0)) != null ? stack1 : "")
|
|
54
54
|
+ "(data: unknown): { valid: true; data: "
|
|
55
55
|
+ ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 19, "column": 75 }, "end": { "line": 19, "column": 79 } }), depth0)) != null ? stack1 : "")
|
|
56
|
-
+ " } | { valid: false; errors:
|
|
56
|
+
+ " } | { valid: false; errors: ErrorObject[] } {\n const validate = ajv.compile("
|
|
57
57
|
+ ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 20, "column": 36 }, "end": { "line": 20, "column": 40 } }), depth0)) != null ? stack1 : "")
|
|
58
58
|
+ "Schema);\n const valid = validate(data);\n if (valid) {\n return { valid: true, data: data as "
|
|
59
59
|
+ ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 23, "column": 47 }, "end": { "line": 23, "column": 51 } }), depth0)) != null ? stack1 : "")
|
|
@@ -13,7 +13,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
13
13
|
}
|
|
14
14
|
return undefined;
|
|
15
15
|
};
|
|
16
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschemaSchemaInterface"), depth0, { "name": "jsonschemaSchemaInterface", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
16
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschema/jsonschemaSchemaInterface"), depth0, { "name": "jsonschema/jsonschemaSchemaInterface", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
17
17
|
}, "3": function (container, depth0, helpers, partials, data) {
|
|
18
18
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
19
19
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -29,7 +29,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
29
29
|
}
|
|
30
30
|
return undefined;
|
|
31
31
|
};
|
|
32
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschemaSchemaEnum"), depth0, { "name": "jsonschemaSchemaEnum", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
32
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschema/jsonschemaSchemaEnum"), depth0, { "name": "jsonschema/jsonschemaSchemaEnum", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
33
33
|
}, "6": function (container, depth0, helpers, partials, data) {
|
|
34
34
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
35
35
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -45,7 +45,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
45
45
|
}
|
|
46
46
|
return undefined;
|
|
47
47
|
};
|
|
48
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschemaSchemaArray"), depth0, { "name": "jsonschemaSchemaArray", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
48
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschema/jsonschemaSchemaArray"), depth0, { "name": "jsonschema/jsonschemaSchemaArray", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
49
49
|
}, "9": function (container, depth0, helpers, partials, data) {
|
|
50
50
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
51
51
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -61,7 +61,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
61
61
|
}
|
|
62
62
|
return undefined;
|
|
63
63
|
};
|
|
64
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschemaSchemaDictionary"), depth0, { "name": "jsonschemaSchemaDictionary", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
64
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschema/jsonschemaSchemaDictionary"), depth0, { "name": "jsonschema/jsonschemaSchemaDictionary", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
65
65
|
}, "12": function (container, depth0, helpers, partials, data) {
|
|
66
66
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
67
67
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -77,7 +77,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
77
77
|
}
|
|
78
78
|
return undefined;
|
|
79
79
|
};
|
|
80
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschemaSchemaComposition"), depth0, { "name": "jsonschemaSchemaComposition", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
80
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschema/jsonschemaSchemaComposition"), depth0, { "name": "jsonschema/jsonschemaSchemaComposition", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
81
81
|
}, "15": function (container, depth0, helpers, partials, data) {
|
|
82
82
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
83
83
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -109,7 +109,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
109
109
|
}
|
|
110
110
|
return undefined;
|
|
111
111
|
};
|
|
112
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschemaSchemaReference"), depth0, { "name": "jsonschemaSchemaReference", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
112
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschema/jsonschemaSchemaReference"), depth0, { "name": "jsonschema/jsonschemaSchemaReference", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
113
113
|
}, "20": function (container, depth0, helpers, partials, data) {
|
|
114
114
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
115
115
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -117,7 +117,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
117
117
|
}
|
|
118
118
|
return undefined;
|
|
119
119
|
};
|
|
120
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschemaSchemaGeneric"), depth0, { "name": "jsonschemaSchemaGeneric", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
120
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschema/jsonschemaSchemaGeneric"), depth0, { "name": "jsonschema/jsonschemaSchemaGeneric", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
121
121
|
}, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
122
122
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
123
123
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -13,7 +13,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
13
13
|
}
|
|
14
14
|
return undefined;
|
|
15
15
|
};
|
|
16
|
-
return ((stack1 = lookupProperty(helpers, "isBasicType").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "link"), { "name": "isBasicType", "hash": {}, "fn": container.program(2, data, 0), "inverse": container.program(4, data, 0), "data": data, "loc": { "start": { "line": 3, "column": 23 }, "end": { "line": 3, "column":
|
|
16
|
+
return ((stack1 = lookupProperty(helpers, "isBasicType").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "link"), { "name": "isBasicType", "hash": {}, "fn": container.program(2, data, 0), "inverse": container.program(4, data, 0), "data": data, "loc": { "start": { "line": 3, "column": 23 }, "end": { "line": 3, "column": 133 } } })) != null ? stack1 : "");
|
|
17
17
|
}, "2": function (container, depth0, helpers, partials, data) {
|
|
18
18
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
19
19
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -21,7 +21,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
21
21
|
}
|
|
22
22
|
return undefined;
|
|
23
23
|
};
|
|
24
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschemaSchemaGeneric"), lookupProperty(depth0, "link"), { "name": "jsonschemaSchemaGeneric", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
24
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschema/jsonschemaSchemaGeneric"), lookupProperty(depth0, "link"), { "name": "jsonschema/jsonschemaSchemaGeneric", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
25
25
|
}, "4": function (container, depth0, helpers, partials, data) {
|
|
26
26
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
27
27
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -29,7 +29,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
29
29
|
}
|
|
30
30
|
return undefined;
|
|
31
31
|
};
|
|
32
|
-
return ((stack1 = container.lambda(container.strict(lookupProperty(depth0, "link"), "type", { "start": { "line": 3, "column":
|
|
32
|
+
return ((stack1 = container.lambda(container.strict(lookupProperty(depth0, "link"), "type", { "start": { "line": 3, "column": 99 }, "end": { "line": 3, "column": 108 } }), depth0)) != null ? stack1 : "")
|
|
33
33
|
+ "Schema";
|
|
34
34
|
}, "6": function (container, depth0, helpers, partials, data) {
|
|
35
35
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
@@ -38,7 +38,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
38
38
|
}
|
|
39
39
|
return undefined;
|
|
40
40
|
};
|
|
41
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschemaSchemaGeneric"), depth0, { "name": "jsonschemaSchemaGeneric", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
41
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschema/jsonschemaSchemaGeneric"), depth0, { "name": "jsonschema/jsonschemaSchemaGeneric", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
42
42
|
}, "8": function (container, depth0, helpers, partials, data) {
|
|
43
43
|
var stack1;
|
|
44
44
|
return " minItems: "
|
|
@@ -64,7 +64,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
64
64
|
return undefined;
|
|
65
65
|
};
|
|
66
66
|
return "{\n type: 'array',\n items: "
|
|
67
|
-
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "link"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(6, data, 0), "data": data, "loc": { "start": { "line": 3, "column": 11 }, "end": { "line": 3, "column":
|
|
67
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "link"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(6, data, 0), "data": data, "loc": { "start": { "line": 3, "column": 11 }, "end": { "line": 3, "column": 187 } } })) != null ? stack1 : "")
|
|
68
68
|
+ ",\n"
|
|
69
69
|
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "minItems"), { "name": "if", "hash": {}, "fn": container.program(8, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 6, "column": 7 } } })) != null ? stack1 : "")
|
|
70
70
|
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "maxItems"), { "name": "if", "hash": {}, "fn": container.program(10, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 9, "column": 7 } } })) != null ? stack1 : "")
|
|
@@ -26,8 +26,8 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
26
26
|
return undefined;
|
|
27
27
|
};
|
|
28
28
|
return " "
|
|
29
|
-
+ ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschemaSchema"), depth0, { "name": "jsonschemaSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
30
|
-
+ ((stack1 = lookupProperty(helpers, "unless").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 5, "column":
|
|
29
|
+
+ ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschema/jsonschemaSchema"), depth0, { "name": "jsonschema/jsonschemaSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
|
|
30
|
+
+ ((stack1 = lookupProperty(helpers, "unless").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(data, "last"), { "name": "unless", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 5, "column": 40 }, "end": { "line": 5, "column": 69 } } })) != null ? stack1 : "")
|
|
31
31
|
+ "\n";
|
|
32
32
|
}, "3": function (container, depth0, helpers, partials, data) {
|
|
33
33
|
return ",";
|
|
@@ -13,7 +13,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
13
13
|
}
|
|
14
14
|
return undefined;
|
|
15
15
|
};
|
|
16
|
-
return ((stack1 = lookupProperty(helpers, "isBasicType").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "link"), { "name": "isBasicType", "hash": {}, "fn": container.program(2, data, 0), "inverse": container.program(4, data, 0), "data": data, "loc": { "start": { "line": 3, "column": 38 }, "end": { "line": 3, "column":
|
|
16
|
+
return ((stack1 = lookupProperty(helpers, "isBasicType").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "link"), { "name": "isBasicType", "hash": {}, "fn": container.program(2, data, 0), "inverse": container.program(4, data, 0), "data": data, "loc": { "start": { "line": 3, "column": 38 }, "end": { "line": 3, "column": 148 } } })) != null ? stack1 : "");
|
|
17
17
|
}, "2": function (container, depth0, helpers, partials, data) {
|
|
18
18
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
19
19
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -21,7 +21,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
21
21
|
}
|
|
22
22
|
return undefined;
|
|
23
23
|
};
|
|
24
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschemaSchemaGeneric"), lookupProperty(depth0, "link"), { "name": "jsonschemaSchemaGeneric", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
24
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschema/jsonschemaSchemaGeneric"), lookupProperty(depth0, "link"), { "name": "jsonschema/jsonschemaSchemaGeneric", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
25
25
|
}, "4": function (container, depth0, helpers, partials, data) {
|
|
26
26
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
27
27
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
@@ -29,7 +29,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
29
29
|
}
|
|
30
30
|
return undefined;
|
|
31
31
|
};
|
|
32
|
-
return ((stack1 = container.lambda(container.strict(lookupProperty(depth0, "link"), "type", { "start": { "line": 3, "column":
|
|
32
|
+
return ((stack1 = container.lambda(container.strict(lookupProperty(depth0, "link"), "type", { "start": { "line": 3, "column": 114 }, "end": { "line": 3, "column": 123 } }), depth0)) != null ? stack1 : "")
|
|
33
33
|
+ "Schema";
|
|
34
34
|
}, "6": function (container, depth0, helpers, partials, data) {
|
|
35
35
|
var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
|
|
@@ -38,7 +38,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
38
38
|
}
|
|
39
39
|
return undefined;
|
|
40
40
|
};
|
|
41
|
-
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschemaSchemaGeneric"), depth0, { "name": "jsonschemaSchemaGeneric", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
41
|
+
return ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschema/jsonschemaSchemaGeneric"), depth0, { "name": "jsonschema/jsonschemaSchemaGeneric", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "");
|
|
42
42
|
}, "8": function (container, depth0, helpers, partials, data) {
|
|
43
43
|
return " nullable: true,\n";
|
|
44
44
|
}, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
|
|
@@ -49,7 +49,7 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
|
|
|
49
49
|
return undefined;
|
|
50
50
|
};
|
|
51
51
|
return "{\n type: 'object',\n additionalProperties: "
|
|
52
|
-
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "link"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(6, data, 0), "data": data, "loc": { "start": { "line": 3, "column": 26 }, "end": { "line": 3, "column":
|
|
52
|
+
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "link"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(6, data, 0), "data": data, "loc": { "start": { "line": 3, "column": 26 }, "end": { "line": 3, "column": 202 } } })) != null ? stack1 : "")
|
|
53
53
|
+ ",\n"
|
|
54
54
|
+ ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(8, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 6, "column": 7 } } })) != null ? stack1 : "")
|
|
55
55
|
+ "}";
|