-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ts-to-oapi] Enums are not generated during conversion. #28
Comments
Just found out about this issue, can confirm enums are not generated. Would be great if this can be fixed! |
Annoying issue |
I was having this issue as well. First, I tried replacing each enum with a string union like this:
Unfortunately, this didn't work. It seems referencing a string union isn't enough. What I had to do instead was replace each reference to an enum with its string union directly, like this:
|
MattHalloran
added a commit
to Vrooli/Vrooli
that referenced
this issue
Jul 23, 2023
Improved the OpenAPI schema, by: - Removing `Resolver` types, which are only used internally by GraphQL - [Replacing enums with string literals](grantila/typeconv#28 (comment))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi. I have a number of TypeScript files which I am trying to generate OpenAPI documentation for using this tool. In one of the typescript files, I have an enum which looks like the following:
I am using the following command to generate OpenAPI documentation from my typescript files:
npx typeconv -f ts -t oapi -o spec ./src/*.ts
When running the above command, everything is generated as expected except for any enums I have in my code, no OpenAPI schema is generated for them.
The text was updated successfully, but these errors were encountered: