You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project where I want to convert my typescript types into an openapi spec. When I run the typeconv command from the cli, the openapi spec that is generated includes various unsupported key words which don't comply.
Another thing to note is that const is an unsupported keyword in version 3. I believe these are getting generated when an interface defines a type using the "or" operator. An example can be found in the repo when the Book genre property has type equal to "Comedy" | "Horror" | "Romance".
Ideally, the output of specifying version 3 for the openapi spec should output valid openapi version 3 yaml.
The text was updated successfully, but these errors were encountered:
I have a project where I want to convert my typescript types into an openapi spec. When I run the typeconv command from the cli, the openapi spec that is generated includes various unsupported key words which don't comply.
I made a sample repo to highlight the problem.
https://github.com/avenmia/test-typeconv-error-repo
When running the following command:
for my types file, I get the following yaml:
The yaml is invalid according to:
https://apitools.dev/swagger-parser/online/
but if you remove the $id and $comments fields then convert it from v3 to v2 using https://lucybot-inc.github.io/api-spec-converter/ then it does validate.
Another thing to note is that const is an unsupported keyword in version 3. I believe these are getting generated when an interface defines a type using the "or" operator. An example can be found in the repo when the Book genre property has type equal to "Comedy" | "Horror" | "Romance".
Ideally, the output of specifying version 3 for the openapi spec should output valid openapi version 3 yaml.
The text was updated successfully, but these errors were encountered: