-
-
Notifications
You must be signed in to change notification settings - Fork 466
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
Property values with defaults are being incorrectly typed as possibly undefined when they shouldn't be. #584
Comments
This was accidentally mentioned in the above PR, sorry for the confusion! |
Okay I was just looking at the diff and it didn't make sense. |
I have a partial fix but I can't figure out how to resolve the refs at runtime. |
I'm unsure of how to call
in |
@gr2m Please see my comment: #613 (comment) |
This is now supported, though it must be enabled with the |
Hi Team,
Thank you for a great module.
It seems the logic in the link below is insufficient to handle if a property able to be defined or undefined.
https://github.com/drwpow/openapi-typescript/blob/4c51afc45f449943bc9e2c58639606b15aaa88b8/src/transform/parameters.ts#L58
If a property isn't required in an object but that property has a default value specified, that property will never be undefined. See the docs at:
https://swagger.io/docs/specification/describing-parameters/
Rusty
The text was updated successfully, but these errors were encountered: