hono-takibi 0.9.9993 → 0.9.9995
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/README.md +57 -14
- package/dist/core/angular-query/index.d.ts +1 -1
- package/dist/core/angular-query/index.js +1 -1
- package/dist/core/docs/index.d.ts +1 -1
- package/dist/core/docs/index.js +1 -1
- package/dist/core/preact-query/index.d.ts +1 -1
- package/dist/core/preact-query/index.js +1 -1
- package/dist/core/rpc/index.d.ts +1 -1
- package/dist/core/rpc/index.js +4 -4
- package/dist/core/solid-query/index.d.ts +1 -1
- package/dist/core/solid-query/index.js +1 -1
- package/dist/core/svelte-query/index.d.ts +1 -1
- package/dist/core/svelte-query/index.js +1 -1
- package/dist/core/swr/index.d.ts +3 -2
- package/dist/core/swr/index.js +2 -13
- package/dist/core/tanstack-query/index.d.ts +1 -1
- package/dist/core/tanstack-query/index.js +1 -1
- package/dist/core/type/index.d.ts +1 -1
- package/dist/core/type/index.js +3 -3
- package/dist/core/vue-query/index.d.ts +1 -1
- package/dist/core/vue-query/index.js +1 -1
- package/dist/{docs-nOKRf8eg.js → docs-BAt1_N22.js} +3 -3
- package/dist/{emit-jWqQ0xpG.js → emit-CFR63U4L.js} +1 -1
- package/dist/generator/zod-openapi-hono/openapi/index.d.ts +1 -1
- package/dist/generator/zod-openapi-hono/openapi/index.js +1 -1
- package/dist/{index-BOXAWTim.d.ts → index-ftN0v_bF.d.ts} +46 -21
- package/dist/index.js +3 -3
- package/dist/{openapi-COY6p6RQ.js → openapi-BVizkubp.js} +236 -461
- package/dist/{openapi-XWXCf9Ne.js → openapi-BsDi2AmJ.js} +557 -930
- package/dist/{query-BdYoX_G6.js → query-l4vdT3u2.js} +7 -99
- package/dist/{rpc-D48XeCBk.js → rpc-BzPo2tZf.js} +1 -1
- package/dist/vite-plugin/index.js +4 -4
- package/package.json +3 -3
- /package/dist/{fsp-CmwX3H5i.js → fsp-BXry-Hx5.js} +0 -0
- /package/dist/{guard-D6ntlNcR.js → guard-BSZ8ezEv.js} +0 -0
- /package/dist/{utils-D2uh73oq.js → utils-Dhc0-ra6.js} +0 -0
package/README.md
CHANGED
|
@@ -514,12 +514,12 @@ All custom message extensions follow the `x-<keyword>-message` naming convention
|
|
|
514
514
|
|
|
515
515
|
#### Common (any schema type)
|
|
516
516
|
|
|
517
|
-
| Extension | Applies to
|
|
518
|
-
| -------------------- |
|
|
519
|
-
| `x-error-message` | All schemas (
|
|
520
|
-
| `x-required-message` | Required properties
|
|
521
|
-
| `x-const-message` | `const`
|
|
522
|
-
| `x-enum-message` | `enum`
|
|
517
|
+
| Extension | Applies to |
|
|
518
|
+
| -------------------- | -------------------------------------------------------------- |
|
|
519
|
+
| `x-error-message` | All schemas (fallback when keyword-specific message is absent) |
|
|
520
|
+
| `x-required-message` | Required properties |
|
|
521
|
+
| `x-const-message` | `const` |
|
|
522
|
+
| `x-enum-message` | `enum` |
|
|
523
523
|
|
|
524
524
|
#### Numeric (number / integer)
|
|
525
525
|
|
|
@@ -565,12 +565,13 @@ All custom message extensions follow the `x-<keyword>-message` naming convention
|
|
|
565
565
|
|
|
566
566
|
#### Combinators
|
|
567
567
|
|
|
568
|
-
| Extension
|
|
569
|
-
|
|
|
570
|
-
| `x-allOf-message`
|
|
571
|
-
| `x-anyOf-message`
|
|
572
|
-
| `x-oneOf-message`
|
|
573
|
-
| `x-not-message`
|
|
568
|
+
| Extension | Applies to |
|
|
569
|
+
| ----------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
570
|
+
| `x-allOf-message` | `allOf` |
|
|
571
|
+
| `x-anyOf-message` | `anyOf` |
|
|
572
|
+
| `x-oneOf-message` | `oneOf` |
|
|
573
|
+
| `x-not-message` | `not` |
|
|
574
|
+
| `x-implication-message` | Implication pattern (`A → B`) encoded as `anyOf:[{not:A},{required:B}]`; takes precedence over `x-anyOf-message` |
|
|
574
575
|
|
|
575
576
|
#### Conditional
|
|
576
577
|
|
|
@@ -612,6 +613,23 @@ homepage:
|
|
|
612
613
|
z.string().trim().pipe(z.url())
|
|
613
614
|
```
|
|
614
615
|
|
|
616
|
+
### String Validation Checks
|
|
617
|
+
|
|
618
|
+
| Extension | Generated | Value |
|
|
619
|
+
| ------------- | ------------------------ | ------ |
|
|
620
|
+
| `x-lowercase` | `z.string().lowercase()` | `true` |
|
|
621
|
+
| `x-uppercase` | `z.string().uppercase()` | `true` |
|
|
622
|
+
|
|
623
|
+
```yaml
|
|
624
|
+
slug:
|
|
625
|
+
type: string
|
|
626
|
+
x-lowercase: true
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
```ts
|
|
630
|
+
z.string().lowercase()
|
|
631
|
+
```
|
|
632
|
+
|
|
615
633
|
### Preprocess (Input Normalization)
|
|
616
634
|
|
|
617
635
|
#### `x-preprocess`
|
|
@@ -645,6 +663,31 @@ z.coerce.number()
|
|
|
645
663
|
z.coerce.date()
|
|
646
664
|
```
|
|
647
665
|
|
|
666
|
+
#### `x-stringbool`
|
|
667
|
+
|
|
668
|
+
```yaml
|
|
669
|
+
notify:
|
|
670
|
+
type: boolean
|
|
671
|
+
x-stringbool: true
|
|
672
|
+
```
|
|
673
|
+
|
|
674
|
+
```ts
|
|
675
|
+
z.stringbool()
|
|
676
|
+
```
|
|
677
|
+
|
|
678
|
+
```yaml
|
|
679
|
+
notify:
|
|
680
|
+
type: boolean
|
|
681
|
+
x-stringbool:
|
|
682
|
+
truthy: ['yes', 'on']
|
|
683
|
+
falsy: ['no', 'off']
|
|
684
|
+
case: 'sensitive'
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
```ts
|
|
688
|
+
z.stringbool({ truthy: ['yes', 'on'], falsy: ['no', 'off'], case: 'sensitive' })
|
|
689
|
+
```
|
|
690
|
+
|
|
648
691
|
### Codec (Bidirectional Transform)
|
|
649
692
|
|
|
650
693
|
#### `x-codec`
|
|
@@ -750,7 +793,7 @@ z.int().catch(0)
|
|
|
750
793
|
|
|
751
794
|
### Immutability
|
|
752
795
|
|
|
753
|
-
#### `x-
|
|
796
|
+
#### `x-readonly`
|
|
754
797
|
|
|
755
798
|
```yaml
|
|
756
799
|
config:
|
|
@@ -758,7 +801,7 @@ config:
|
|
|
758
801
|
properties:
|
|
759
802
|
name:
|
|
760
803
|
type: string
|
|
761
|
-
x-
|
|
804
|
+
x-readonly: true
|
|
762
805
|
```
|
|
763
806
|
|
|
764
807
|
```ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as OpenAPI } from "../../index-
|
|
1
|
+
import { t as OpenAPI } from "../../index-ftN0v_bF.js";
|
|
2
2
|
|
|
3
3
|
//#region src/core/angular-query/index.d.ts
|
|
4
4
|
declare function angularQuery(openAPI: OpenAPI, output: string, importPath: string, split?: boolean, clientName?: string): Promise<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as makeQueryHooks } from "../../query-
|
|
1
|
+
import { t as makeQueryHooks } from "../../query-l4vdT3u2.js";
|
|
2
2
|
//#region src/core/angular-query/index.ts
|
|
3
3
|
async function angularQuery(openAPI, output, importPath, split, clientName = "client") {
|
|
4
4
|
return makeQueryHooks(openAPI, output, importPath, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as OpenAPI } from "../../index-
|
|
1
|
+
import { t as OpenAPI } from "../../index-ftN0v_bF.js";
|
|
2
2
|
|
|
3
3
|
//#region src/core/docs/index.d.ts
|
|
4
4
|
declare function docs(openAPI: OpenAPI, output: string, entry?: string, basePath?: string, curl?: boolean, baseUrl?: string): Promise<{
|
package/dist/core/docs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as docs } from "../../docs-
|
|
1
|
+
import { t as docs } from "../../docs-BAt1_N22.js";
|
|
2
2
|
export { docs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as OpenAPI } from "../../index-
|
|
1
|
+
import { t as OpenAPI } from "../../index-ftN0v_bF.js";
|
|
2
2
|
|
|
3
3
|
//#region src/core/preact-query/index.d.ts
|
|
4
4
|
declare function preactQuery(openAPI: OpenAPI, output: string, importPath: string, split?: boolean, clientName?: string): Promise<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as makeQueryHooks } from "../../query-
|
|
1
|
+
import { t as makeQueryHooks } from "../../query-l4vdT3u2.js";
|
|
2
2
|
//#region src/core/preact-query/index.ts
|
|
3
3
|
async function preactQuery(openAPI, output, importPath, split, clientName = "client") {
|
|
4
4
|
return makeQueryHooks(openAPI, output, importPath, {
|
package/dist/core/rpc/index.d.ts
CHANGED
package/dist/core/rpc/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as emit } from "../../emit-
|
|
2
|
-
import { c as isOperationLike, f as isRecord, o as isOpenAPIPaths } from "../../guard-
|
|
3
|
-
import { c as methodPath, o as makeInferRequestType } from "../../utils-
|
|
4
|
-
import { a as parsePathItem, i as operationHasArgs, o as resolveSplitOutDir, r as makeOperationDeps, t as formatPath } from "../../rpc-
|
|
1
|
+
import { t as emit } from "../../emit-CFR63U4L.js";
|
|
2
|
+
import { c as isOperationLike, f as isRecord, o as isOpenAPIPaths } from "../../guard-BSZ8ezEv.js";
|
|
3
|
+
import { c as methodPath, o as makeInferRequestType } from "../../utils-Dhc0-ra6.js";
|
|
4
|
+
import { a as parsePathItem, i as operationHasArgs, o as resolveSplitOutDir, r as makeOperationDeps, t as formatPath } from "../../rpc-BzPo2tZf.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
//#region src/core/rpc/index.ts
|
|
7
7
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as OpenAPI } from "../../index-
|
|
1
|
+
import { t as OpenAPI } from "../../index-ftN0v_bF.js";
|
|
2
2
|
|
|
3
3
|
//#region src/core/solid-query/index.d.ts
|
|
4
4
|
declare function solidQuery(openAPI: OpenAPI, output: string, importPath: string, split?: boolean, clientName?: string): Promise<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as makeQueryHooks } from "../../query-
|
|
1
|
+
import { t as makeQueryHooks } from "../../query-l4vdT3u2.js";
|
|
2
2
|
//#region src/core/solid-query/index.ts
|
|
3
3
|
async function solidQuery(openAPI, output, importPath, split, clientName = "client") {
|
|
4
4
|
return makeQueryHooks(openAPI, output, importPath, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as OpenAPI } from "../../index-
|
|
1
|
+
import { t as OpenAPI } from "../../index-ftN0v_bF.js";
|
|
2
2
|
|
|
3
3
|
//#region src/core/svelte-query/index.d.ts
|
|
4
4
|
declare function svelteQuery(openAPI: OpenAPI, output: string, importPath: string, split?: boolean, clientName?: string): Promise<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as makeQueryHooks } from "../../query-
|
|
1
|
+
import { t as makeQueryHooks } from "../../query-l4vdT3u2.js";
|
|
2
2
|
//#region src/core/svelte-query/index.ts
|
|
3
3
|
async function svelteQuery(openAPI, output, importPath, split, clientName = "client") {
|
|
4
4
|
return makeQueryHooks(openAPI, output, importPath, {
|
package/dist/core/swr/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as OpenAPI } from "../../index-
|
|
1
|
+
import { t as OpenAPI } from "../../index-ftN0v_bF.js";
|
|
2
2
|
|
|
3
3
|
//#region src/core/swr/index.d.ts
|
|
4
4
|
declare function swr(openAPI: OpenAPI, output: string, importPath: string, split?: boolean, clientName?: string): Promise<{
|
|
@@ -7,7 +7,8 @@ declare function swr(openAPI: OpenAPI, output: string, importPath: string, split
|
|
|
7
7
|
readonly value?: never;
|
|
8
8
|
} | {
|
|
9
9
|
readonly ok: true;
|
|
10
|
-
readonly value: `Generated
|
|
10
|
+
readonly value: `Generated ${string} hooks written to ${string}`;
|
|
11
|
+
readonly error?: never;
|
|
11
12
|
}>;
|
|
12
13
|
//#endregion
|
|
13
14
|
export { swr };
|
package/dist/core/swr/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as makeQueryHooks } from "../../query-
|
|
1
|
+
import { t as makeQueryHooks } from "../../query-l4vdT3u2.js";
|
|
2
2
|
//#region src/core/swr/index.ts
|
|
3
3
|
async function swr(openAPI, output, importPath, split, clientName = "client") {
|
|
4
|
-
|
|
4
|
+
return makeQueryHooks(openAPI, output, importPath, {
|
|
5
5
|
packageName: "swr",
|
|
6
6
|
frameworkName: "SWR",
|
|
7
7
|
hookPrefix: "use",
|
|
@@ -14,17 +14,6 @@ async function swr(openAPI, output, importPath, split, clientName = "client") {
|
|
|
14
14
|
infiniteQueryFn: "useSWRInfinite",
|
|
15
15
|
useInfiniteQueryOptionsType: "SWRInfiniteConfiguration"
|
|
16
16
|
}, split, clientName);
|
|
17
|
-
if (result.ok) {
|
|
18
|
-
if (split) return {
|
|
19
|
-
ok: true,
|
|
20
|
-
value: `Generated swr hooks written to ${output.endsWith(".ts") ? output.slice(0, -9) : output}/*.ts (index.ts included)`
|
|
21
|
-
};
|
|
22
|
-
return {
|
|
23
|
-
ok: true,
|
|
24
|
-
value: `Generated swr hooks written to ${output}`
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
return result;
|
|
28
17
|
}
|
|
29
18
|
//#endregion
|
|
30
19
|
export { swr };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as OpenAPI } from "../../index-
|
|
1
|
+
import { t as OpenAPI } from "../../index-ftN0v_bF.js";
|
|
2
2
|
|
|
3
3
|
//#region src/core/tanstack-query/index.d.ts
|
|
4
4
|
declare function tanstackQuery(openAPI: OpenAPI, output: string, importPath: string, split?: boolean, clientName?: string): Promise<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as makeQueryHooks } from "../../query-
|
|
1
|
+
import { t as makeQueryHooks } from "../../query-l4vdT3u2.js";
|
|
2
2
|
//#region src/core/tanstack-query/index.ts
|
|
3
3
|
async function tanstackQuery(openAPI, output, importPath, split, clientName = "client") {
|
|
4
4
|
return makeQueryHooks(openAPI, output, importPath, {
|
package/dist/core/type/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as emit } from "../../emit-
|
|
2
|
-
import { g as isSchemaArray, i as isMediaWithSchema, l as isParameter, m as isRequestBody, n as isHttpMethod, s as isOperation, u as isParameterArray, x as isStringRef } from "../../guard-
|
|
3
|
-
import { s as makeSafeKey } from "../../utils-
|
|
1
|
+
import { t as emit } from "../../emit-CFR63U4L.js";
|
|
2
|
+
import { g as isSchemaArray, i as isMediaWithSchema, l as isParameter, m as isRequestBody, n as isHttpMethod, s as isOperation, u as isParameterArray, x as isStringRef } from "../../guard-BSZ8ezEv.js";
|
|
3
|
+
import { s as makeSafeKey } from "../../utils-Dhc0-ra6.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
//#region src/core/type/index.ts
|
|
6
6
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as OpenAPI } from "../../index-
|
|
1
|
+
import { t as OpenAPI } from "../../index-ftN0v_bF.js";
|
|
2
2
|
|
|
3
3
|
//#region src/core/vue-query/index.d.ts
|
|
4
4
|
declare function vueQuery(openAPI: OpenAPI, output: string, importPath: string, split?: boolean, clientName?: string): Promise<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as makeQueryHooks } from "../../query-
|
|
1
|
+
import { t as makeQueryHooks } from "../../query-l4vdT3u2.js";
|
|
2
2
|
//#region src/core/vue-query/index.ts
|
|
3
3
|
async function vueQuery(openAPI, output, importPath, split, clientName = "client") {
|
|
4
4
|
return makeQueryHooks(openAPI, output, importPath, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as writeFile, t as mkdir } from "./fsp-
|
|
2
|
-
import { a as isOAuthFlowValue, b as isSecurityScheme, f as isRecord, h as isResponses, m as isRequestBody, p as isRefObject, r as isMedia, y as isSecurityArray } from "./guard-
|
|
1
|
+
import { a as writeFile, t as mkdir } from "./fsp-BXry-Hx5.js";
|
|
2
|
+
import { a as isOAuthFlowValue, b as isSecurityScheme, f as isRecord, h as isResponses, m as isRequestBody, p as isRefObject, r as isMedia, y as isSecurityArray } from "./guard-BSZ8ezEv.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { STATUS_CODES } from "node:http";
|
|
5
5
|
//#region src/generator/docs/index.ts
|
|
@@ -461,7 +461,7 @@ function makeResponsesTable(operation, components) {
|
|
|
461
461
|
const rows = [];
|
|
462
462
|
for (const [statusCode, response] of Object.entries(operation.responses)) {
|
|
463
463
|
const resolvedResponse = resolveResponse(response, components);
|
|
464
|
-
const meaningStr = STATUS_CODES[statusCode] ?? statusCode;
|
|
464
|
+
const meaningStr = STATUS_CODES[Number(statusCode)] ?? statusCode;
|
|
465
465
|
const description = resolvedResponse.description ?? "";
|
|
466
466
|
const jsonMedia = resolvedResponse.content?.["application/json"];
|
|
467
467
|
const schemaStr = jsonMedia && isMedia(jsonMedia) && jsonMedia.schema ? jsonMedia.schema.$ref ? `[${refName(jsonMedia.schema.$ref)}](#schema${refName(jsonMedia.schema.$ref).toLowerCase()})` : "Inline" : "None";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as zodOpenAPIHono } from "../../../openapi-
|
|
1
|
+
import { t as zodOpenAPIHono } from "../../../openapi-BsDi2AmJ.js";
|
|
2
2
|
export { zodOpenAPIHono };
|
|
@@ -29,9 +29,9 @@ type OpenAPI = BaseOpenAPI & {
|
|
|
29
29
|
readonly [k: string]: PathItem;
|
|
30
30
|
};
|
|
31
31
|
readonly components?: Components;
|
|
32
|
-
readonly security?: {
|
|
33
|
-
readonly name
|
|
34
|
-
};
|
|
32
|
+
readonly security?: readonly {
|
|
33
|
+
readonly [name: string]: readonly string[];
|
|
34
|
+
}[];
|
|
35
35
|
readonly tags?: {
|
|
36
36
|
readonly name: string;
|
|
37
37
|
readonly summary?: string;
|
|
@@ -221,9 +221,9 @@ type Operation = {
|
|
|
221
221
|
};
|
|
222
222
|
};
|
|
223
223
|
readonly deprecated?: boolean;
|
|
224
|
-
readonly security?: {
|
|
225
|
-
readonly
|
|
226
|
-
};
|
|
224
|
+
readonly security?: readonly {
|
|
225
|
+
readonly [scheme: string]: readonly string[];
|
|
226
|
+
}[];
|
|
227
227
|
readonly servers?: readonly {
|
|
228
228
|
readonly url: string;
|
|
229
229
|
readonly description?: string;
|
|
@@ -320,9 +320,6 @@ type Schema = {
|
|
|
320
320
|
readonly deprecated?: boolean;
|
|
321
321
|
readonly additionalProperties?: Schema | boolean;
|
|
322
322
|
readonly $ref?: Ref;
|
|
323
|
-
readonly security?: {
|
|
324
|
-
readonly name?: readonly string[];
|
|
325
|
-
}[];
|
|
326
323
|
readonly oneOf?: readonly Schema[];
|
|
327
324
|
readonly allOf?: readonly Schema[];
|
|
328
325
|
readonly anyOf?: readonly Schema[];
|
|
@@ -335,18 +332,7 @@ type Schema = {
|
|
|
335
332
|
readonly dependentRequired?: {
|
|
336
333
|
readonly [k: string]: readonly string[];
|
|
337
334
|
};
|
|
338
|
-
/**
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
*
|
|
343
|
-
*/
|
|
344
335
|
readonly 'x-error-message'?: string;
|
|
345
|
-
/**
|
|
346
|
-
*
|
|
347
|
-
*
|
|
348
|
-
*
|
|
349
|
-
*/
|
|
350
336
|
readonly 'x-length-message'?: string;
|
|
351
337
|
readonly 'x-pattern-message'?: string;
|
|
352
338
|
readonly 'x-minimum-message'?: string;
|
|
@@ -355,12 +341,26 @@ type Schema = {
|
|
|
355
341
|
readonly 'x-exclusiveMaximum-message'?: string;
|
|
356
342
|
readonly 'x-multipleOf-message'?: string;
|
|
357
343
|
readonly 'x-dependentRequired-message'?: string;
|
|
344
|
+
/**
|
|
345
|
+
* Overrides the validation message for `dependentSchemas` violations
|
|
346
|
+
* (JSON Schema 2020-12 §10.2.2.4). The inner sub-schema's `code` / `path`
|
|
347
|
+
* / `expected` are preserved; only `message` is replaced. Falls back to
|
|
348
|
+
* `x-error-message`.
|
|
349
|
+
*/
|
|
358
350
|
readonly 'x-dependentSchemas-message'?: string;
|
|
359
351
|
readonly 'x-propertyNames-message'?: string;
|
|
360
352
|
readonly 'x-allOf-message'?: string;
|
|
361
353
|
readonly 'x-anyOf-message'?: string;
|
|
362
354
|
readonly 'x-oneOf-message'?: string;
|
|
363
355
|
readonly 'x-not-message'?: string;
|
|
356
|
+
/**
|
|
357
|
+
* Semantic alias for the implication pattern (`A → B`) encoded as
|
|
358
|
+
* `anyOf:[{not:A},{required:B}]`. Takes precedence over `x-anyOf-message`
|
|
359
|
+
* in the anyOf code path, then falls back to `x-error-message`. Acts as a
|
|
360
|
+
* documentation aid — explicitly marking the schema author's intent — and
|
|
361
|
+
* is silently ignored on schemas without `anyOf`.
|
|
362
|
+
*/
|
|
363
|
+
readonly 'x-implication-message'?: string;
|
|
364
364
|
readonly 'x-required-message'?: string;
|
|
365
365
|
readonly 'x-additionalProperties-message'?: string;
|
|
366
366
|
readonly 'x-uniqueItems-message'?: string;
|
|
@@ -418,6 +418,17 @@ type Schema = {
|
|
|
418
418
|
readonly 'x-uppercase'?: boolean;
|
|
419
419
|
readonly 'x-normalize'?: 'NFC' | 'NFD' | 'NFKC' | 'NFKD';
|
|
420
420
|
readonly 'x-coerce'?: boolean;
|
|
421
|
+
/**
|
|
422
|
+
* Opt into `z.stringbool()` for boolean schemas. Use `true` for the default
|
|
423
|
+
* truthy/falsy lists, or pass an object to customize. Mutually exclusive
|
|
424
|
+
* with `x-coerce: true` on the same schema (build error).
|
|
425
|
+
* @see https://zod.dev/api?id=stringbool
|
|
426
|
+
*/
|
|
427
|
+
readonly 'x-stringbool'?: true | {
|
|
428
|
+
readonly truthy?: readonly string[];
|
|
429
|
+
readonly falsy?: readonly string[];
|
|
430
|
+
readonly case?: 'sensitive' | 'insensitive';
|
|
431
|
+
};
|
|
421
432
|
readonly 'x-emailPattern'?: 'html5' | 'rfc5322' | 'unicode';
|
|
422
433
|
readonly 'x-emailRegex'?: string;
|
|
423
434
|
readonly 'x-uuidVersion'?: 'v1' | 'v2' | 'v3' | 'v4' | 'v5' | 'v6' | 'v7' | 'v8';
|
|
@@ -433,12 +444,26 @@ type Schema = {
|
|
|
433
444
|
readonly 'x-hashEnc'?: 'hex' | 'base64' | 'base64url';
|
|
434
445
|
readonly 'x-catch'?: unknown;
|
|
435
446
|
readonly 'x-prefault'?: unknown;
|
|
436
|
-
readonly 'x-
|
|
447
|
+
readonly 'x-readonly'?: boolean;
|
|
437
448
|
readonly 'x-includes'?: string;
|
|
438
449
|
readonly 'x-startsWith'?: string;
|
|
439
450
|
readonly 'x-endsWith'?: string;
|
|
440
451
|
readonly 'x-refine'?: string;
|
|
441
452
|
readonly 'x-superRefine'?: string;
|
|
453
|
+
/**
|
|
454
|
+
* Bidirectional codec. The value is a complete `z.codec(...)` expression
|
|
455
|
+
* string and replaces the base schema verbatim. Authors can paste the Zod
|
|
456
|
+
* docs example directly: `z.codec(z.iso.datetime(), z.date(), {...})`.
|
|
457
|
+
*
|
|
458
|
+
* Applied to any schema type. The author is responsible for ensuring the
|
|
459
|
+
* codec's input side matches the surrounding wire shape; the generator does
|
|
460
|
+
* not introspect the expression. Precedence among replacing extensions
|
|
461
|
+
* (outermost wins): `x-preprocess` > `x-transform` > `x-pipe` > `x-codec`.
|
|
462
|
+
* On `type: 'string'` with `format: ^sha\\d+$` or `x-coerce: true`, the
|
|
463
|
+
* string emitter consumes the codec first — those exclusions are intentional.
|
|
464
|
+
*
|
|
465
|
+
* @see https://zod.dev/codecs
|
|
466
|
+
*/
|
|
442
467
|
readonly 'x-codec'?: string;
|
|
443
468
|
readonly 'x-preprocess'?: string;
|
|
444
469
|
readonly 'x-transform'?: string;
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { readConfig } from "./config/index.js";
|
|
3
|
-
import { r as setFormatOptions } from "./emit-
|
|
4
|
-
import { _ as examples, a as takibi, c as securitySchemes, d as requestBodies, f as pathItems, g as headers, h as links, i as template, l as schemas, m as mediaTypes, n as webhooks, o as route, p as parameters, r as test, s as mock, t as parseOpenAPI, u as responses, v as callbacks } from "./openapi-
|
|
3
|
+
import { r as setFormatOptions } from "./emit-CFR63U4L.js";
|
|
4
|
+
import { _ as examples, a as takibi, c as securitySchemes, d as requestBodies, f as pathItems, g as headers, h as links, i as template, l as schemas, m as mediaTypes, n as webhooks, o as route, p as parameters, r as test, s as mock, t as parseOpenAPI, u as responses, v as callbacks } from "./openapi-BVizkubp.js";
|
|
5
5
|
import { angularQuery } from "./core/angular-query/index.js";
|
|
6
|
-
import { t as docs } from "./docs-
|
|
6
|
+
import { t as docs } from "./docs-BAt1_N22.js";
|
|
7
7
|
import { preactQuery } from "./core/preact-query/index.js";
|
|
8
8
|
import { rpc } from "./core/rpc/index.js";
|
|
9
9
|
import { solidQuery } from "./core/solid-query/index.js";
|