diff --git a/.changeset/eleven-pillows-bathe.md b/.changeset/eleven-pillows-bathe.md new file mode 100644 index 0000000000..befa9443bf --- /dev/null +++ b/.changeset/eleven-pillows-bathe.md @@ -0,0 +1,5 @@ +--- +'@hey-api/openapi-ts': patch +--- + +fix(typescript): remove legacy options diff --git a/packages/openapi-ts/src/plugins/@hey-api/typescript/config.ts b/packages/openapi-ts/src/plugins/@hey-api/typescript/config.ts index dbc3163888..1f2a1f3a47 100644 --- a/packages/openapi-ts/src/plugins/@hey-api/typescript/config.ts +++ b/packages/openapi-ts/src/plugins/@hey-api/typescript/config.ts @@ -9,9 +9,7 @@ export const defaultConfig: HeyApiTypeScriptPlugin['Config'] = { config: { case: 'PascalCase', exportFromIndex: true, - style: 'preserve', topType: 'unknown', - tree: false, }, handler, name: '@hey-api/typescript', 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 116b9ee1ac..b1dd85645b 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 @@ -240,37 +240,6 @@ export type UserConfig = Plugin.Name<'@hey-api/typescript'> & */ payload?: StringName; }; - - // DEPRECATED OPTIONS BELOW - - /** - * **This feature works only with the legacy parser** - * - * Include only types matching regular expression. - * - * @deprecated - */ - // eslint-disable-next-line typescript-sort-keys/interface - include?: string; - /** - * **This feature works only with the legacy parser** - * - * Use your preferred naming pattern - * - * @deprecated - * @default 'preserve' - */ - style?: 'PascalCase' | 'preserve'; - /** - * **This feature works only with the legacy parser** - * - * Generate a tree of types containing all operations? It will be named - * $OpenApiTs. - * - * @deprecated - * @default false - */ - tree?: boolean; }; export type Config = Plugin.Name<'@hey-api/typescript'> & @@ -463,37 +432,6 @@ export type Config = Plugin.Name<'@hey-api/typescript'> & */ payload: StringName; }; - - // DEPRECATED OPTIONS BELOW - - /** - * **This feature works only with the legacy parser** - * - * Include only types matching regular expression. - * - * @deprecated - */ - // eslint-disable-next-line typescript-sort-keys/interface - include?: string; - /** - * **This feature works only with the legacy parser** - * - * Use your preferred naming pattern - * - * @deprecated - * @default 'preserve' - */ - style: 'PascalCase' | 'preserve'; - /** - * **This feature works only with the legacy parser** - * - * Generate a tree of types containing all operations? It will be named - * $OpenApiTs. - * - * @deprecated - * @default false - */ - tree: boolean; }; export type HeyApiTypeScriptPlugin = DefinePlugin; diff --git a/packages/openapi-ts/src/plugins/types.d.ts b/packages/openapi-ts/src/plugins/types.d.ts index 90bbe0813b..b0db7b4db6 100644 --- a/packages/openapi-ts/src/plugins/types.d.ts +++ b/packages/openapi-ts/src/plugins/types.d.ts @@ -31,7 +31,7 @@ export type PluginNames = export type AnyPluginName = PluginNames | (string & {}); -type PluginTag = 'client' | 'transformer' | 'validator'; +type PluginTag = 'client' | 'sdk' | 'transformer' | 'validator'; export type PluginContext = { package: Package;