hey-api / openapi-ts

✨ Turn your OpenAPI specification into a beautiful TypeScript client
https://heyapi.vercel.app
Other
1.17k stars 94 forks source link

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

Open primeapple opened 3 days ago

primeapple commented 3 days 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 3 days ago

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