@kubb/adapter-oas 5.0.0-beta.104 → 5.0.0-beta.105

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.js CHANGED
@@ -61,12 +61,13 @@ const structuralKeys = /* @__PURE__ */ new Set([
61
61
  ]);
62
62
  /**
63
63
  * Formats `convertFormat` maps to a dedicated type without going through `formatMap`:
64
- * `int64` and the date/time family. Keep this in sync with the `convertFormat`
64
+ * `int64`, `uint64` and the date/time family. Keep this in sync with the `convertFormat`
65
65
  * special-cases in `parser.ts`. `isHandledFormat` reads it so the
66
66
  * `KUBB_UNSUPPORTED_FORMAT` diagnostic and the parser agree on what is handled.
67
67
  */
68
68
  const specialCasedFormats = /* @__PURE__ */ new Set([
69
69
  "int64",
70
+ "uint64",
70
71
  "date-time",
71
72
  "date",
72
73
  "time"
@@ -821,14 +822,14 @@ function getOperations(document, refs) {
821
822
  //#region src/emit/schemaShape.ts
822
823
  /**
823
824
  * Returns the Kubb `SchemaType` for a given OAS `format` string, or `null` if not found.
824
- * Formats not in `formatMap` (e.g., `int64`, `date-time`) are handled separately by parser options.
825
+ * Formats not in `formatMap` (e.g., `int64`, `uint64`, `date-time`) are handled separately by parser options.
825
826
  */
826
827
  function getSchemaType(format) {
827
828
  return formatMap[format] ?? null;
828
829
  }
829
830
  /**
830
831
  * Whether the parser maps `format` to a dedicated type. True for any `formatMap` entry, plus the
831
- * `specialCasedFormats` that `convertFormat` handles directly. False means the format falls back to
832
+ * `specialCasedFormats` that `convertFormat` handles directly (int64, uint64, date-time, date, time). False means the format falls back to
832
833
  * the base type, which is what `KUBB_UNSUPPORTED_FORMAT` flags. Reading both sources keeps the
833
834
  * diagnostic in step with the parser as `formatMap` grows.
834
835
  */
@@ -1346,7 +1347,7 @@ function convertFormat({ schema, name, nullable, defaultValue, options }) {
1346
1347
  nullable,
1347
1348
  defaultValue
1348
1349
  };
1349
- if (schema.format === "int64") return createNode(ctx, {
1350
+ if (schema.format === "int64" || schema.format === "uint64") return createNode(ctx, {
1350
1351
  type: options.integerType === "bigint" ? "bigint" : "integer",
1351
1352
  primitive: "integer",
1352
1353
  min: schema.minimum,