-
-
Notifications
You must be signed in to change notification settings - Fork 616
Closed
Labels
bugSomething isn't workingSomething isn't workingopenapi-tsRelevant to the openapi-typescript libraryRelevant to the openapi-typescript library
Description
openapi-typescript version
7.10.1
Node.js version
24.11.0
OS + version
macOS 26.2 (25C56)
Description
When a schema is defined as
SomeSchema:
type: string
enum: [ 1 ]and "true enum" generation is turned on, it produces the following:
export enum SomeSchema {
Value1 = 1
}i.e. the value is numeric, though it's defined as string in the schema. Server then returns (valid) string values and numeric equality checks on the client (matching the API type) fail.
Reproduction
Already clearly defined in description.
Expected result
Already clearly defined in description.
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