- #2117
a1435b9Thanks @johnny-mh! - docs: add docs forinput.patchfeature
-
#1511
4e8064dThanks @mrlubos! - feat: add watch mode::: warning Watch mode currently supports only remote files via URL. :::
If your schema changes frequently, you may want to automatically regenerate the output during development. To watch your input file for changes, enable
watchmode in your configuration or pass the--watchflag to the CLI.export default { client: '@hey-api/client-fetch', input: 'path/to/openapi.json', output: 'src/client', watch: true, };
npx @hey-api/openapi-ts \ -c @hey-api/client-fetch \ -i path/to/openapi.json \ -o src/client \ -w
-
#1201
972a93aThanks @mrlubos! - feat: make plugins first-class citizensThis release makes plugins first-class citizens. In order to achieve that, the following breaking changes were introduced.
The
--types,--schemas, and--servicesCLI options have been removed. You can list which plugins you'd like to use explicitly by passing a list of plugins as--plugins <plugin1> <plugin2>Previously, you could explicitly disable export of certain artifacts using the
*.exportoption or its shorthand variant. These were both removed. You can now disable export of specific artifacts by manually defining an array ofpluginsand excluding the unwanted plugin.::: code-group
export default { client: '@hey-api/client-fetch', input: 'path/to/openapi.json', output: 'src/client', schemas: false, // [!code --] plugins: ['@hey-api/types', '@hey-api/services'], // [!code ++] };
export default { client: '@hey-api/client-fetch', input: 'path/to/openapi.json', output: 'src/client', schemas: { export: false, // [!code --] }, plugins: ['@hey-api/types', '@hey-api/services'], // [!code ++] };
:::
Each plugin definition contains a
namefield. This was conflicting with theschemas.nameoption. As a result, it has been renamed tonameBuilder.export default { client: '@hey-api/client-fetch', input: 'path/to/openapi.json', output: 'src/client', schemas: { name: (name) => `${name}Schema`, // [!code --] }, plugins: [ // ...other plugins { nameBuilder: (name) => `${name}Schema`, // [!code ++] name: '@hey-api/schemas', }, ], };
Previously, you could use a string value as a shorthand for the
services.includeconfiguration option. You can now achieve the same result using theincludeoption.export default { client: '@hey-api/client-fetch', input: 'path/to/openapi.json', output: 'src/client', services: '^MySchema', // [!code --] plugins: [ // ...other plugins { include: '^MySchema', // [!code ++] name: '@hey-api/services', }, ], };
Each plugin definition contains a
namefield. This was conflicting with theservices.nameoption. As a result, it has been renamed toserviceNameBuilder.export default { client: '@hey-api/client-fetch', input: 'path/to/openapi.json', output: 'src/client', services: { name: '{{name}}Service', // [!code --] }, plugins: [ // ...other plugins { serviceNameBuilder: '{{name}}Service', // [!code ++] name: '@hey-api/services', }, ], };
Previously, you could set
types.datesto a boolean or a string value, depending on whether you wanted to transform only type strings into dates, or runtime code too. Many people found these options confusing, so they have been simplified to a boolean and extracted into a separate@hey-api/transformersplugin.export default { client: '@hey-api/client-fetch', input: 'path/to/openapi.json', output: 'src/client', types: { dates: 'types+transform', // [!code --] }, plugins: [ // ...other plugins { dates: true, // [!code ++] name: '@hey-api/transformers', }, ], };
Previously, you could use a string value as a shorthand for the
types.includeconfiguration option. You can now achieve the same result using theincludeoption.export default { client: '@hey-api/client-fetch', input: 'path/to/openapi.json', output: 'src/client', types: '^MySchema', // [!code --] plugins: [ // ...other plugins { include: '^MySchema', // [!code ++] name: '@hey-api/types', }, ], };
Each plugin definition contains a
namefield. This was conflicting with thetypes.nameoption. As a result, it has been renamed tostyle.export default { client: '@hey-api/client-fetch', input: 'path/to/openapi.json', output: 'src/client', types: { name: 'PascalCase', // [!code --] }, plugins: [ // ...other plugins { name: '@hey-api/types', style: 'PascalCase', // [!code ++] }, ], };
-
#830
babf11aThanks @mrlubos! - docs: split clients documentation into separate pages -
#830
323d0a0Thanks @mrlubos! - docs: remove interceptors page in favour of per-client sections
- docs: add migration for v0.45.0 (#569)
- docs: add format and lint migration for 0.44.0 (#546)
-
docs: add links to homepage (#489)
-
feat: remove enum postfix, use typescript enums in types when generated, export enums from types.gen.ts (#498)
-
docs: add examples (#476)
- docs: add github action to integrations (#451)
- docs: add tanstack-query and http clients sections (#436)
- feat: allow choosing naming convention for types (#402)
- docs: add enums migration (#358)
- fix: rename write to dryRun and invert value (#326)
- docs: update contributing guidelines (#347)
- docs: add migration notes (#306)
- fix(config): rename exportSchemas to schemas (#288)
- docs: add support for localization of docs (#251)
- docs: add logo (#250)