@hey-api/openapi-ts 0.75.0 → 0.76.0

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.
@@ -1,6 +1,6 @@
1
1
  import { JSONSchema } from '@hey-api/json-schema-ref-parser';
2
- import { e as Config, I as IR, W as WatchValues } from './types.d-CjrgVCUn.cjs';
3
- export { i as initConfigs } from './types.d-CjrgVCUn.cjs';
2
+ import { e as Config, I as IR, W as WatchValues } from './types.d-CMe37_rr.cjs';
3
+ export { i as initConfigs } from './types.d-CMe37_rr.cjs';
4
4
  import 'node:fs';
5
5
  import 'typescript';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { JSONSchema } from '@hey-api/json-schema-ref-parser';
2
- import { e as Config, I as IR, W as WatchValues } from './types.d-CjrgVCUn.js';
3
- export { i as initConfigs } from './types.d-CjrgVCUn.js';
2
+ import { e as Config, I as IR, W as WatchValues } from './types.d-CMe37_rr.js';
3
+ export { i as initConfigs } from './types.d-CMe37_rr.js';
4
4
  import 'node:fs';
5
5
  import 'typescript';
6
6
 
package/dist/internal.js CHANGED
@@ -1,2 +1,2 @@
1
- import {createRequire}from'module';export{r as getSpec,I as initConfigs,B as parseOpenApiSpec}from'./chunk-D24GAR6J.js';createRequire(import.meta.url);//# sourceMappingURL=internal.js.map
1
+ import {createRequire}from'module';export{r as getSpec,I as initConfigs,B as parseOpenApiSpec}from'./chunk-W3E6ZK5Y.js';createRequire(import.meta.url);//# sourceMappingURL=internal.js.map
2
2
  //# sourceMappingURL=internal.js.map
@@ -7755,16 +7755,53 @@ interface Config$3 extends Plugin.Name<'fastify'> {
7755
7755
  output?: string;
7756
7756
  }
7757
7757
 
7758
- // import type { IR } from '../../ir/types';
7759
-
7760
-
7761
7758
  interface Config$2 extends Plugin.Name<'valibot'> {
7759
+ /**
7760
+ * The casing convention to use for generated names.
7761
+ *
7762
+ * @default 'camelCase'
7763
+ */
7764
+ case?: StringCase;
7762
7765
  /**
7763
7766
  * Add comments from input to the generated Valibot schemas?
7764
7767
  *
7765
7768
  * @default true
7766
7769
  */
7767
7770
  comments?: boolean;
7771
+ /**
7772
+ * Configuration for reusable schema definitions. Controls generation of
7773
+ * shared Valibot schemas that can be referenced across requests and
7774
+ * responses.
7775
+ *
7776
+ * Can be:
7777
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
7778
+ * - `string`: Shorthand for `{ enabled: true; name: string }`
7779
+ * - `object`: Full configuration object
7780
+ */
7781
+ definitions?:
7782
+ | boolean
7783
+ | string
7784
+ | {
7785
+ /**
7786
+ * The casing convention to use for generated names.
7787
+ *
7788
+ * @default 'camelCase'
7789
+ */
7790
+ case?: StringCase;
7791
+ /**
7792
+ * Whether to generate Valibot schemas for reusable definitions.
7793
+ *
7794
+ * @default true
7795
+ */
7796
+ enabled?: boolean;
7797
+ /**
7798
+ * Custom naming pattern for generated schema names. The name variable is
7799
+ * obtained from the schema name.
7800
+ *
7801
+ * @default 'v{{name}}'
7802
+ */
7803
+ name?: string | ((name: string) => string);
7804
+ };
7768
7805
  /**
7769
7806
  * Should the exports from the generated files be re-exported in the index
7770
7807
  * barrel file?
@@ -7773,16 +7810,87 @@ interface Config$2 extends Plugin.Name<'valibot'> {
7773
7810
  */
7774
7811
  exportFromIndex?: boolean;
7775
7812
  /**
7776
- * Customise the Valibot schema name. By default, `v{{name}}` is used,
7777
- * where `name` is a definition name or an operation name.
7813
+ * Enable Valibot metadata support? It's often useful to associate a schema
7814
+ * with some additional metadata for documentation, code generation, AI
7815
+ * structured outputs, form validation, and other purposes.
7816
+ *
7817
+ * @default false
7778
7818
  */
7779
- // nameBuilder?: (model: IR.OperationObject | IR.SchemaObject) => string;
7819
+ metadata?: boolean;
7780
7820
  /**
7781
7821
  * Name of the generated file.
7782
7822
  *
7783
7823
  * @default 'valibot'
7784
7824
  */
7785
7825
  output?: string;
7826
+ /**
7827
+ * Configuration for request-specific Valibot schemas.
7828
+ * Controls generation of Valibot schemas for request bodies, query
7829
+ * parameters, path parameters, and headers.
7830
+ *
7831
+ * Can be:
7832
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
7833
+ * - `string`: Shorthand for `{ enabled: true; name: string }`
7834
+ * - `object`: Full configuration object
7835
+ */
7836
+ requests?:
7837
+ | boolean
7838
+ | string
7839
+ | {
7840
+ /**
7841
+ * The casing convention to use for generated names.
7842
+ *
7843
+ * @default 'camelCase'
7844
+ */
7845
+ case?: StringCase;
7846
+ /**
7847
+ * Whether to generate Valibot schemas for request definitions.
7848
+ *
7849
+ * @default true
7850
+ */
7851
+ enabled?: boolean;
7852
+ /**
7853
+ * Custom naming pattern for generated schema names. The name variable is
7854
+ * obtained from the operation name.
7855
+ *
7856
+ * @default 'v{{name}}Data'
7857
+ */
7858
+ name?: string | ((name: string) => string);
7859
+ };
7860
+ /**
7861
+ * Configuration for response-specific Valibot schemas.
7862
+ * Controls generation of Valibot schemas for response bodies, error
7863
+ * responses, and status codes.
7864
+ *
7865
+ * Can be:
7866
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
7867
+ * - `string`: Shorthand for `{ enabled: true; name: string }`
7868
+ * - `object`: Full configuration object
7869
+ */
7870
+ responses?:
7871
+ | boolean
7872
+ | string
7873
+ | {
7874
+ /**
7875
+ * The casing convention to use for generated names.
7876
+ *
7877
+ * @default 'camelCase'
7878
+ */
7879
+ case?: StringCase;
7880
+ /**
7881
+ * Whether to generate Valibot schemas for response definitions.
7882
+ *
7883
+ * @default true
7884
+ */
7885
+ enabled?: boolean;
7886
+ /**
7887
+ * Custom naming pattern for generated schema names. The name variable is
7888
+ * obtained from the operation name.
7889
+ *
7890
+ * @default 'v{{name}}Response'
7891
+ */
7892
+ name?: string | ((name: string) => string);
7893
+ };
7786
7894
  }
7787
7895
 
7788
7896
  interface Config$1 extends Plugin.Name<'zod'> {
@@ -7755,16 +7755,53 @@ interface Config$3 extends Plugin.Name<'fastify'> {
7755
7755
  output?: string;
7756
7756
  }
7757
7757
 
7758
- // import type { IR } from '../../ir/types';
7759
-
7760
-
7761
7758
  interface Config$2 extends Plugin.Name<'valibot'> {
7759
+ /**
7760
+ * The casing convention to use for generated names.
7761
+ *
7762
+ * @default 'camelCase'
7763
+ */
7764
+ case?: StringCase;
7762
7765
  /**
7763
7766
  * Add comments from input to the generated Valibot schemas?
7764
7767
  *
7765
7768
  * @default true
7766
7769
  */
7767
7770
  comments?: boolean;
7771
+ /**
7772
+ * Configuration for reusable schema definitions. Controls generation of
7773
+ * shared Valibot schemas that can be referenced across requests and
7774
+ * responses.
7775
+ *
7776
+ * Can be:
7777
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
7778
+ * - `string`: Shorthand for `{ enabled: true; name: string }`
7779
+ * - `object`: Full configuration object
7780
+ */
7781
+ definitions?:
7782
+ | boolean
7783
+ | string
7784
+ | {
7785
+ /**
7786
+ * The casing convention to use for generated names.
7787
+ *
7788
+ * @default 'camelCase'
7789
+ */
7790
+ case?: StringCase;
7791
+ /**
7792
+ * Whether to generate Valibot schemas for reusable definitions.
7793
+ *
7794
+ * @default true
7795
+ */
7796
+ enabled?: boolean;
7797
+ /**
7798
+ * Custom naming pattern for generated schema names. The name variable is
7799
+ * obtained from the schema name.
7800
+ *
7801
+ * @default 'v{{name}}'
7802
+ */
7803
+ name?: string | ((name: string) => string);
7804
+ };
7768
7805
  /**
7769
7806
  * Should the exports from the generated files be re-exported in the index
7770
7807
  * barrel file?
@@ -7773,16 +7810,87 @@ interface Config$2 extends Plugin.Name<'valibot'> {
7773
7810
  */
7774
7811
  exportFromIndex?: boolean;
7775
7812
  /**
7776
- * Customise the Valibot schema name. By default, `v{{name}}` is used,
7777
- * where `name` is a definition name or an operation name.
7813
+ * Enable Valibot metadata support? It's often useful to associate a schema
7814
+ * with some additional metadata for documentation, code generation, AI
7815
+ * structured outputs, form validation, and other purposes.
7816
+ *
7817
+ * @default false
7778
7818
  */
7779
- // nameBuilder?: (model: IR.OperationObject | IR.SchemaObject) => string;
7819
+ metadata?: boolean;
7780
7820
  /**
7781
7821
  * Name of the generated file.
7782
7822
  *
7783
7823
  * @default 'valibot'
7784
7824
  */
7785
7825
  output?: string;
7826
+ /**
7827
+ * Configuration for request-specific Valibot schemas.
7828
+ * Controls generation of Valibot schemas for request bodies, query
7829
+ * parameters, path parameters, and headers.
7830
+ *
7831
+ * Can be:
7832
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
7833
+ * - `string`: Shorthand for `{ enabled: true; name: string }`
7834
+ * - `object`: Full configuration object
7835
+ */
7836
+ requests?:
7837
+ | boolean
7838
+ | string
7839
+ | {
7840
+ /**
7841
+ * The casing convention to use for generated names.
7842
+ *
7843
+ * @default 'camelCase'
7844
+ */
7845
+ case?: StringCase;
7846
+ /**
7847
+ * Whether to generate Valibot schemas for request definitions.
7848
+ *
7849
+ * @default true
7850
+ */
7851
+ enabled?: boolean;
7852
+ /**
7853
+ * Custom naming pattern for generated schema names. The name variable is
7854
+ * obtained from the operation name.
7855
+ *
7856
+ * @default 'v{{name}}Data'
7857
+ */
7858
+ name?: string | ((name: string) => string);
7859
+ };
7860
+ /**
7861
+ * Configuration for response-specific Valibot schemas.
7862
+ * Controls generation of Valibot schemas for response bodies, error
7863
+ * responses, and status codes.
7864
+ *
7865
+ * Can be:
7866
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
7867
+ * - `string`: Shorthand for `{ enabled: true; name: string }`
7868
+ * - `object`: Full configuration object
7869
+ */
7870
+ responses?:
7871
+ | boolean
7872
+ | string
7873
+ | {
7874
+ /**
7875
+ * The casing convention to use for generated names.
7876
+ *
7877
+ * @default 'camelCase'
7878
+ */
7879
+ case?: StringCase;
7880
+ /**
7881
+ * Whether to generate Valibot schemas for response definitions.
7882
+ *
7883
+ * @default true
7884
+ */
7885
+ enabled?: boolean;
7886
+ /**
7887
+ * Custom naming pattern for generated schema names. The name variable is
7888
+ * obtained from the operation name.
7889
+ *
7890
+ * @default 'v{{name}}Response'
7891
+ */
7892
+ name?: string | ((name: string) => string);
7893
+ };
7786
7894
  }
7787
7895
 
7788
7896
  interface Config$1 extends Plugin.Name<'zod'> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hey-api/openapi-ts",
3
- "version": "0.75.0",
3
+ "version": "0.76.0",
4
4
  "description": "🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more.",
5
5
  "homepage": "https://heyapi.dev/",
6
6
  "repository": {