-
-
Notifications
You must be signed in to change notification settings - Fork 532
Schema without a type should be "any" or "unknown" instead of a generic map type #693
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
Comments
I’m in favor of this change. I’m thinking that this along with #554 should result in a new major (breaking) version bump that makes these type changes. I have held off on these because it would be just disruptive enough to people that I’d want them to be able to delay switching. But I agree that long-term, following the spec more closely is best. |
drwpow
added a commit
that referenced
this issue
Sep 30, 2021
drwpow
added a commit
that referenced
this issue
Sep 30, 2021
drwpow
added a commit
that referenced
this issue
Sep 30, 2021
Thank you so much @drwpow! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
According to the OpenAPI spec, when a schema is defined without a type it is the equivalent of:
but openapi-typescript uses
object
type as the default and generates{ [key: string]: unknown }
. Instead it should generate justunknown
.The text was updated successfully, but these errors were encountered: