-
-
Notifications
You must be signed in to change notification settings - Fork 616
Open
Labels
bugSomething isn't workingSomething isn't workingopenapi-tsRelevant to the openapi-typescript libraryRelevant to the openapi-typescript library
Description
openapi-typescript version
7.12.0
Node.js version
20.x.x
OS + version
Archlinux
Description
When generating TypeScript types from OpenAPI specs, enum values containing backslashes (\) are not properly escaped in the generated type unions.
Reproduction
OpenAPI spec:
{
"enum": ["a", "b", "c", "\\", ...]
}Generated output:
type Keys = 'a' | 'b' | 'c' | '\' | ...;Expected result
type Keys = 'a' | 'b' | 'c' | '\\' | ...;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)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingopenapi-tsRelevant to the openapi-typescript libraryRelevant to the openapi-typescript library