hey-api / openapi-ts

🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more. Support: @mrlubos
https://heyapi.dev
Other
1.4k stars 106 forks source link

Config for pascal case naming of enums does not work #1134

Open primeapple opened 1 month ago

primeapple commented 1 month ago

Description

When setting name: 'PascalCase' in the types section of the config, it still preserves the name of the Enums.

May be related to https://github.com/hey-api/openapi-ts/issues/558

Reproducible example or configuration

export default defineConfig({
  client: "@hey-api/client-fetch",
  input: "api.json",
  output: {
    path: "src-generated/",
    format: "prettier",
  },
  schemas: false,
  types: {
    dates: "types+transform",
    enums: "javascript",
    // the problem
    name: "PascalCase",
  },
});

A stackblitz example: https://stackblitz.com/edit/hey-api-client-fetch-example-ycq6mm?file=src%2Fclient%2Ftypes.gen.ts

OpenAPI specification (optional)

No response

System information (optional)

No response

stackblitz[bot] commented 1 month ago

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

BierDav commented 3 days ago

I also stumpled on that one, it seams not a big deal to me