Description
Description
Generate a separate interface for each components.schemas
model to provide a better development experience and easier models consumption.
Proposal
I've created a diff PR with the proposed changes, showing how the final result would look. As you can see, it's a fairly straightforward change, but it can make a significant difference in how VSCode provides hints. You can compare the before and after screenshots below.
In real-world environments, having anonymous classes & hints is not very useful. Models often tend to be large, and in the many of cases, it's not even possible to determine which model you're looking at just by examining its shape. Providing a model interface name addresses this issue. It also enables referencing models by their interface names throughout the codebase, which is very convenient,
This perhaps can be an optional generator switch.
Checklist
- I’m willing to open a PR for this (see CONTRIBUTING.md)