-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Make the generation of unknown
types for undefined spec configurable
#1116
Comments
Hey @jmechevarria, what's the impact of this change? |
Hey @mrlubos
|
I have the same issue using
I would extend the types in config
other options could be replace the empty body with |
The original issue will be fixed in the new parser. In fact it's fixed already, but more work needs to happen before it's quite ready for you. If you'd like the other issue resolved after that, please open a new ticket. |
Description
This is similar, but not quite the same, to #820.
Spec excerpt:
Generated TS relating to the response body:
In this case, if I don't define anything for the response body, it still gets generated as an
unknown
type. The name of this type is inferred from theoperationId
field, eg:operationId: loginMethod
->LoginMethodResponse
This is unexpected behavior for me, after switching from openapi-typescript-codegen.
Still, it might be by design now, which is why I'm not reporting a bug, but instead asking for the possibility to make it configurable; thus allowing the developer to choose NOT to generate a type at all (even
void
would be preferable here).Thanks
The text was updated successfully, but these errors were encountered: