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
This is a good question/thought. But I don't think there is a solution, or at least not a simple one :(
This open issue (pydantic/pydantic#8161) seems to be about the same problem, albeit with allOf rather than extends. And it does not sound like it's going to be implemented by pydantic any time soon.
Will need to think on this
Maybe if you had a custom schema generator function with a check like
if a parent exists:
add the parent ref via "extends" or "allOf"
then iterate through "properties" for both parent and child, deleting from "child" if the definition is unchanged
Currently if I have
The generated output is:
When a better output would be:
It seems https://github.com/bcherny/json-schema-to-typescript supports this. See this example.
The text was updated successfully, but these errors were encountered: