-
-
Notifications
You must be signed in to change notification settings - Fork 563
Description
openapi-typescript version
7.5.2
Node.js version
20.11.0
OS + version
Fedora Linux 41
Description
after executing the tool with --root-types --root-types-no-schema-prefix --enum
flags (since types are required for not refactoring the whole application and Schema
prefix avoided due to the same reason...) some of the enums are duplicated also as type aliases, which is producing an error at TS validation time.
I'm clicking My OpenAPI schema is valid and passes the [Redocly validator](https://redocly.com/docs/cli/commands/lint/) (npx @redocly/cli@latest lint) *
because it is required, I have few issues but none of them related with the enums
It is mandatory for us to use --root-types-no-schema-prefix
not to affect the whole application
Reproduction
npx openapi-typescript https://api.stage.openshift.com/api/clusters_mgmt/v1/openapi -o src/types/clusters_mgmt.v1/schema.ts --root-types --root-types-no-schema-prefix --enum
Expected result
Maybe different type alias name, see case for AWSInfrastructureAccessRoleState
where enum is AWSInfrastructureAccessRoleState
(AWS
uppercase) and type AwsInfrastructureAccessRoleGrantState
(Aws
upper first)
Required
- My OpenAPI schema is valid and passes the Redocly validator (
npx @redocly/cli@latest lint
)
Extra
- I’m willing to open a PR (see CONTRIBUTING.md)