@kubb/core 5.15.4 → 5.16.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.
- package/dist/index.cjs +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -261,6 +261,12 @@ declare const diagnosticCatalog: {
|
|
|
261
261
|
readonly cause: 'Schemas that only `$ref` each other form a loop, so none of them has a shape to generate. Kubb resolves them to `unknown`.';
|
|
262
262
|
readonly fix: 'Break the loop by giving one of the schemas a real definition, or remove the `$ref` that closes it.';
|
|
263
263
|
};
|
|
264
|
+
readonly duplicateDiscriminator: {
|
|
265
|
+
readonly code: 'KUBB_DUPLICATE_DISCRIMINATOR';
|
|
266
|
+
readonly title: 'Duplicate discriminator value';
|
|
267
|
+
readonly cause: 'Two or more `oneOf`/`anyOf` members pin the `discriminator` property to the same value, so the value cannot pick a branch. Zod `z.discriminatedUnion` throws on the first parse of such a union.';
|
|
268
|
+
readonly fix: 'Give each member its own discriminator value, or drop the `discriminator` so the members are matched by shape.';
|
|
269
|
+
};
|
|
264
270
|
readonly deprecated: {
|
|
265
271
|
readonly code: 'KUBB_DEPRECATED';
|
|
266
272
|
readonly title: 'Deprecated';
|
|
@@ -1897,6 +1903,7 @@ export declare class Diagnostics {
|
|
|
1897
1903
|
readonly noContext: "KUBB_NO_CONTEXT";
|
|
1898
1904
|
readonly unsupportedFormat: "KUBB_UNSUPPORTED_FORMAT";
|
|
1899
1905
|
readonly aliasCycle: "KUBB_ALIAS_CYCLE";
|
|
1906
|
+
readonly duplicateDiscriminator: "KUBB_DUPLICATE_DISCRIMINATOR";
|
|
1900
1907
|
readonly deprecated: "KUBB_DEPRECATED";
|
|
1901
1908
|
readonly adapterRequired: "KUBB_ADAPTER_REQUIRED";
|
|
1902
1909
|
readonly pathTraversal: "KUBB_PATH_TRAVERSAL";
|
package/dist/index.d.ts
CHANGED
|
@@ -261,6 +261,12 @@ declare const diagnosticCatalog: {
|
|
|
261
261
|
readonly cause: 'Schemas that only `$ref` each other form a loop, so none of them has a shape to generate. Kubb resolves them to `unknown`.';
|
|
262
262
|
readonly fix: 'Break the loop by giving one of the schemas a real definition, or remove the `$ref` that closes it.';
|
|
263
263
|
};
|
|
264
|
+
readonly duplicateDiscriminator: {
|
|
265
|
+
readonly code: 'KUBB_DUPLICATE_DISCRIMINATOR';
|
|
266
|
+
readonly title: 'Duplicate discriminator value';
|
|
267
|
+
readonly cause: 'Two or more `oneOf`/`anyOf` members pin the `discriminator` property to the same value, so the value cannot pick a branch. Zod `z.discriminatedUnion` throws on the first parse of such a union.';
|
|
268
|
+
readonly fix: 'Give each member its own discriminator value, or drop the `discriminator` so the members are matched by shape.';
|
|
269
|
+
};
|
|
264
270
|
readonly deprecated: {
|
|
265
271
|
readonly code: 'KUBB_DEPRECATED';
|
|
266
272
|
readonly title: 'Deprecated';
|
|
@@ -1897,6 +1903,7 @@ export declare class Diagnostics {
|
|
|
1897
1903
|
readonly noContext: "KUBB_NO_CONTEXT";
|
|
1898
1904
|
readonly unsupportedFormat: "KUBB_UNSUPPORTED_FORMAT";
|
|
1899
1905
|
readonly aliasCycle: "KUBB_ALIAS_CYCLE";
|
|
1906
|
+
readonly duplicateDiscriminator: "KUBB_DUPLICATE_DISCRIMINATOR";
|
|
1900
1907
|
readonly deprecated: "KUBB_DEPRECATED";
|
|
1901
1908
|
readonly adapterRequired: "KUBB_ADAPTER_REQUIRED";
|
|
1902
1909
|
readonly pathTraversal: "KUBB_PATH_TRAVERSAL";
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ var __name = (target, value) => __defProp(target, "name", {
|
|
|
21
21
|
configurable: true
|
|
22
22
|
});
|
|
23
23
|
// package.json
|
|
24
|
-
var version = "5.
|
|
24
|
+
var version = "5.16.1";
|
|
25
25
|
// ../../internals/utils/src/casing.ts
|
|
26
26
|
/**
|
|
27
27
|
* Shared implementation for camelCase and PascalCase conversion.
|
|
@@ -641,6 +641,12 @@ const diagnosticCatalog = {
|
|
|
641
641
|
cause: "Schemas that only `$ref` each other form a loop, so none of them has a shape to generate. Kubb resolves them to `unknown`.",
|
|
642
642
|
fix: "Break the loop by giving one of the schemas a real definition, or remove the `$ref` that closes it."
|
|
643
643
|
},
|
|
644
|
+
duplicateDiscriminator: {
|
|
645
|
+
code: "KUBB_DUPLICATE_DISCRIMINATOR",
|
|
646
|
+
title: "Duplicate discriminator value",
|
|
647
|
+
cause: "Two or more `oneOf`/`anyOf` members pin the `discriminator` property to the same value, so the value cannot pick a branch. Zod `z.discriminatedUnion` throws on the first parse of such a union.",
|
|
648
|
+
fix: "Give each member its own discriminator value, or drop the `discriminator` so the members are matched by shape."
|
|
649
|
+
},
|
|
644
650
|
deprecated: {
|
|
645
651
|
code: "KUBB_DEPRECATED",
|
|
646
652
|
title: "Deprecated",
|