fork of hey-api/openapi-ts because I need some additional things

@docs/openapi-ts#

0.10.4#

Patch Changes#

0.10.3#

Patch Changes#

0.10.2#

Patch Changes#

0.10.1#

Patch Changes#

0.10.0#

Minor Changes#

0.9.0#

Minor Changes#

  • #1511 4e8064d Thanks @mrlubos! - feat: add watch mode

    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 watch mode in your configuration or pass the --watch flag to the CLI.

    Config#

    export default {
      client: '@hey-api/client-fetch',
      input: 'path/to/openapi.json',
      output: 'src/client',
      watch: true,
    };
    

    CLI#

    npx @hey-api/openapi-ts \
      -c @hey-api/client-fetch \
      -i path/to/openapi.json \
      -o src/client \
      -w
    

Patch Changes#

0.8.0#

Minor Changes#

Patch Changes#

0.7.4#

Patch Changes#

0.7.3#

Patch Changes#

0.7.2#

Patch Changes#

0.7.1#

Patch Changes#

  • #1222 ceb4363 Thanks @mrlubos! - feat: add support for @tanstack/angular-query-experimental package

0.7.0#

Minor Changes#

  • #1201 972a93a Thanks @mrlubos! - feat: make plugins first-class citizens

    This release makes plugins first-class citizens. In order to achieve that, the following breaking changes were introduced.

    Removed CLI options#

    The --types, --schemas, and --services CLI 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>

    Removed *.export option#

    Previously, you could explicitly disable export of certain artifacts using the *.export option or its shorthand variant. These were both removed. You can now disable export of specific artifacts by manually defining an array of plugins and 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 ++]
    };
    

    :::

    Renamed schemas.name option#

    Each plugin definition contains a name field. This was conflicting with the schemas.name option. As a result, it has been renamed to nameBuilder.

    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',
        },
      ],
    };
    

    Removed services.include shorthand option#

    Previously, you could use a string value as a shorthand for the services.include configuration option. You can now achieve the same result using the include option.

    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',
        },
      ],
    };
    

    Renamed services.name option#

    Each plugin definition contains a name field. This was conflicting with the services.name option. As a result, it has been renamed to serviceNameBuilder.

    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',
        },
      ],
    };
    

    Renamed types.dates option#

    Previously, you could set types.dates to 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/transformers plugin.

    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',
        },
      ],
    };
    

    Removed types.include shorthand option#

    Previously, you could use a string value as a shorthand for the types.include configuration option. You can now achieve the same result using the include option.

    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',
        },
      ],
    };
    

    Renamed types.name option#

    Each plugin definition contains a name field. This was conflicting with the types.name option. As a result, it has been renamed to style.

    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 ++]
        },
      ],
    };
    

0.6.2#

Patch Changes#

0.6.1#

Patch Changes#

0.6.0#

Minor Changes#

0.5.11#

Patch Changes#

0.5.10#

Patch Changes#

0.5.9#

Patch Changes#

0.5.8#

Patch Changes#

0.5.7#

Patch Changes#

0.5.6#

Patch Changes#

  • docs: add fetch client documentation (#602)

  • docs: add migration notes for v0.46.0 (#602)

0.5.5#

Patch Changes#

  • docs: add migration for v0.45.0 (#569)

0.5.4#

Patch Changes#

  • docs: add format and lint migration for 0.44.0 (#546)

0.5.3#

Patch Changes#

  • 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)

0.5.2#

Patch Changes#

  • docs: add github action to integrations (#451)

0.5.1#

Patch Changes#

  • docs: add tanstack-query and http clients sections (#436)

0.5.0#

Minor Changes#

  • feat: allow choosing naming convention for types (#402)

0.4.0#

Minor Changes#

  • docs: add integrations (#394)

  • feat: rename generated files (#363)

Patch Changes#

  • docs: add enums migration (#358)

0.3.0#

Minor Changes#

  • fix: rename write to dryRun and invert value (#326)

Patch Changes#

  • docs: update contributing guidelines (#347)

0.2.2#

Patch Changes#

  • docs: add migration notes (#306)

0.2.1#

Patch Changes#

  • fix(config): rename exportSchemas to schemas (#288)

0.2.0#

Minor Changes#

  • docs: add support for localization of docs (#251)

Patch Changes#

  • docs: add logo (#250)