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
A brief description of the issue.
A schema of type: "object" with no other information specified is being parsed as an empty (Record<string, never>) object, but I would expect it to be an Record<string, any>
Disagree. In my opinion it should just generate to the object type. That way, if you try to access a property on the object, you need to validate that it both exists first and that the type is what you expect.
Alternatively, I could see Record<string, unknown> so you at least have to prove the type. I really dislike the idea of introducing anys.
Description
A brief description of the issue.
A schema of type: "object" with no other information specified is being parsed as an empty (Record<string, never>) object, but I would expect it to be an Record<string, any>
I think it would have to be changed in here, correct me if I'm wrong:
https://github.com/drwpow/openapi-typescript/blob/3ffb475d15352ebc1dd2f823b01d3ae8b18ef68b/src/transform/schema-object.ts#L244
OpenAPI

Generated TS
*Expected TS
Checklist
The text was updated successfully, but these errors were encountered: