From f86d293f18f133ef6dd2f4864d037611b81edd26 Mon Sep 17 00:00:00 2001 From: Lubos Date: Fri, 20 Dec 2024 03:24:39 +0800 Subject: [PATCH] fix: add links to the experimental parser callouts --- .changeset/lovely-lies-impress.md | 7 +++++++ packages/client-axios/src/types.ts | 6 ++++++ packages/client-fetch/src/types.ts | 6 ++++++ packages/openapi-ts/src/plugins/@hey-api/sdk/types.d.ts | 4 ++-- .../openapi-ts/src/plugins/@hey-api/typescript/types.d.ts | 6 +++--- packages/openapi-ts/src/plugins/types.d.ts | 2 +- packages/openapi-ts/src/types/config.ts | 6 +++--- .../v3-hey-api-client-axios-bundle/client/types.ts.snap | 6 ++++++ .../client/types.ts.snap | 6 ++++++ .../v3-hey-api-client-fetch-bundle/client/types.ts.snap | 6 ++++++ .../client/types.ts.snap | 6 ++++++ 11 files changed, 52 insertions(+), 9 deletions(-) create mode 100644 .changeset/lovely-lies-impress.md diff --git a/.changeset/lovely-lies-impress.md b/.changeset/lovely-lies-impress.md new file mode 100644 index 000000000..865183a9d --- /dev/null +++ b/.changeset/lovely-lies-impress.md @@ -0,0 +1,7 @@ +--- +'@hey-api/client-axios': patch +'@hey-api/client-fetch': patch +'@hey-api/openapi-ts': patch +--- + +fix: add links to the experimental parser callouts diff --git a/packages/client-axios/src/types.ts b/packages/client-axios/src/types.ts index 927d791f5..8db32019c 100644 --- a/packages/client-axios/src/types.ts +++ b/packages/client-axios/src/types.ts @@ -17,11 +17,15 @@ type OmitKeys = Pick>; export interface Config extends Omit { /** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** + * * Access token or a function returning access token. The resolved token will * be added to request payload as required. */ accessToken?: (() => Promise) | string | undefined; /** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** + * * API key or a function returning API key. The resolved key will be added * to the request payload as required. */ @@ -88,6 +92,8 @@ export interface Config */ responseTransformer?: (data: unknown) => Promise; /** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** + * * A function validating response data. This is useful if you want to ensure * the response conforms to the desired shape, so it can be safely passed to * the transformers and returned to the user. diff --git a/packages/client-fetch/src/types.ts b/packages/client-fetch/src/types.ts index 4049d690b..4a66eb115 100644 --- a/packages/client-fetch/src/types.ts +++ b/packages/client-fetch/src/types.ts @@ -10,11 +10,15 @@ type OmitKeys = Pick>; export interface Config extends Omit { /** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** + * * Access token or a function returning access token. The resolved token * will be added to request headers where it's required. */ accessToken?: (() => Promise) | string | undefined; /** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** + * * API key or a function returning API key. The resolved key will be added * to the request payload as required. */ @@ -93,6 +97,8 @@ export interface Config */ responseTransformer?: (data: unknown) => Promise; /** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** + * * A function validating response data. This is useful if you want to ensure * the response conforms to the desired shape, so it can be safely passed to * the transformers and returned to the user. diff --git a/packages/openapi-ts/src/plugins/@hey-api/sdk/types.d.ts b/packages/openapi-ts/src/plugins/@hey-api/sdk/types.d.ts index fe10f393b..916c3bfad 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/sdk/types.d.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/sdk/types.d.ts @@ -16,7 +16,7 @@ export interface Config extends Plugin.Name<'@hey-api/sdk'> { */ asClass?: boolean; /** - * **This feature works only with the experimental parser** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** * * Should the generated functions contain auth mechanisms? You may want to * disable this option if you're handling auth yourself or defining it @@ -90,7 +90,7 @@ export interface Config extends Plugin.Name<'@hey-api/sdk'> { */ transformer?: '@hey-api/transformers' | boolean; /** - * **This feature works only with the experimental parser** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** * * Validate response data against schema before returning. This is useful * if you want to ensure the response conforms to a desired shape. However, diff --git a/packages/openapi-ts/src/plugins/@hey-api/typescript/types.d.ts b/packages/openapi-ts/src/plugins/@hey-api/typescript/types.d.ts index df320201f..4db3fa823 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/typescript/types.d.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/typescript/types.d.ts @@ -11,7 +11,7 @@ export interface Config extends Plugin.Name<'@hey-api/typescript'> { */ enums?: 'javascript' | 'typescript' | 'typescript+namespace' | false; /** - * **This feature works only with the experimental parser** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** * * Defines casing of the enum keys. By default, we use `SCREAMING_SNAKE_CASE`. * This option has effect only when `enums` is defined. @@ -20,7 +20,7 @@ export interface Config extends Plugin.Name<'@hey-api/typescript'> { */ enumsCase?: StringCase; /** - * **This feature works only with the experimental parser** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** * * By default, inline enums (enums not defined as reusable components in * the input file) are generated as inlined union types. You can set @@ -31,7 +31,7 @@ export interface Config extends Plugin.Name<'@hey-api/typescript'> { */ exportInlineEnums?: boolean; /** - * **This feature works only with the experimental parser** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** * * Defines casing of the identifiers. By default, we use `PascalCase`. * diff --git a/packages/openapi-ts/src/plugins/types.d.ts b/packages/openapi-ts/src/plugins/types.d.ts index 5e2a84c60..fdc85a35d 100644 --- a/packages/openapi-ts/src/plugins/types.d.ts +++ b/packages/openapi-ts/src/plugins/types.d.ts @@ -32,7 +32,7 @@ export interface PluginContext { interface BaseConfig { /** - * **This feature works only with the experimental parser** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** * * Should the exports from the plugin's file be re-exported in the index * barrel file? diff --git a/packages/openapi-ts/src/types/config.ts b/packages/openapi-ts/src/types/config.ts index 84bb936df..018e47ed5 100644 --- a/packages/openapi-ts/src/types/config.ts +++ b/packages/openapi-ts/src/types/config.ts @@ -81,7 +81,7 @@ export interface ClientConfig { | Record | { /** - * **This feature works only with the experimental parser** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** * * Prevent parts matching the regular expression from being processed. * You can select both operations and components by reference within @@ -94,7 +94,7 @@ export interface ClientConfig { */ exclude?: string; /** - * **This feature works only with the experimental parser** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** * * Process only parts matching the regular expression. You can select both * operations and components by reference within the bundled input. In @@ -159,7 +159,7 @@ export interface ClientConfig { | string | { /** - * **This feature works only with the experimental parser** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** * * Defines casing of the output fields. By default, we preserve `input` * values as data transforms incur a performance penalty at runtime. diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3-hey-api-client-axios-bundle/client/types.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3-hey-api-client-axios-bundle/client/types.ts.snap index 927d791f5..8db32019c 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3-hey-api-client-axios-bundle/client/types.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3-hey-api-client-axios-bundle/client/types.ts.snap @@ -17,11 +17,15 @@ type OmitKeys = Pick>; export interface Config extends Omit { /** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** + * * Access token or a function returning access token. The resolved token will * be added to request payload as required. */ accessToken?: (() => Promise) | string | undefined; /** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** + * * API key or a function returning API key. The resolved key will be added * to the request payload as required. */ @@ -88,6 +92,8 @@ export interface Config */ responseTransformer?: (data: unknown) => Promise; /** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** + * * A function validating response data. This is useful if you want to ensure * the response conforms to the desired shape, so it can be safely passed to * the transformers and returned to the user. diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3-hey-api-client-axios-bundle_transform/client/types.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3-hey-api-client-axios-bundle_transform/client/types.ts.snap index 927d791f5..8db32019c 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3-hey-api-client-axios-bundle_transform/client/types.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3-hey-api-client-axios-bundle_transform/client/types.ts.snap @@ -17,11 +17,15 @@ type OmitKeys = Pick>; export interface Config extends Omit { /** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** + * * Access token or a function returning access token. The resolved token will * be added to request payload as required. */ accessToken?: (() => Promise) | string | undefined; /** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** + * * API key or a function returning API key. The resolved key will be added * to the request payload as required. */ @@ -88,6 +92,8 @@ export interface Config */ responseTransformer?: (data: unknown) => Promise; /** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** + * * A function validating response data. This is useful if you want to ensure * the response conforms to the desired shape, so it can be safely passed to * the transformers and returned to the user. diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3-hey-api-client-fetch-bundle/client/types.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3-hey-api-client-fetch-bundle/client/types.ts.snap index 4049d690b..4a66eb115 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3-hey-api-client-fetch-bundle/client/types.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3-hey-api-client-fetch-bundle/client/types.ts.snap @@ -10,11 +10,15 @@ type OmitKeys = Pick>; export interface Config extends Omit { /** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** + * * Access token or a function returning access token. The resolved token * will be added to request headers where it's required. */ accessToken?: (() => Promise) | string | undefined; /** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** + * * API key or a function returning API key. The resolved key will be added * to the request payload as required. */ @@ -93,6 +97,8 @@ export interface Config */ responseTransformer?: (data: unknown) => Promise; /** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** + * * A function validating response data. This is useful if you want to ensure * the response conforms to the desired shape, so it can be safely passed to * the transformers and returned to the user. diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3-hey-api-client-fetch-bundle_transform/client/types.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3-hey-api-client-fetch-bundle_transform/client/types.ts.snap index 4049d690b..4a66eb115 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3-hey-api-client-fetch-bundle_transform/client/types.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3-hey-api-client-fetch-bundle_transform/client/types.ts.snap @@ -10,11 +10,15 @@ type OmitKeys = Pick>; export interface Config extends Omit { /** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** + * * Access token or a function returning access token. The resolved token * will be added to request headers where it's required. */ accessToken?: (() => Promise) | string | undefined; /** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** + * * API key or a function returning API key. The resolved key will be added * to the request payload as required. */ @@ -93,6 +97,8 @@ export interface Config */ responseTransformer?: (data: unknown) => Promise; /** + * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)** + * * A function validating response data. This is useful if you want to ensure * the response conforms to the desired shape, so it can be safely passed to * the transformers and returned to the user.