Open rafalkrupinski opened 2 months ago
@mike-oakley
Hey @rafalkrupinski - apologies for my slow reply here! Commented on the other issues too, but in general i'm happy to accept contributions if its enhancing/within the spirit of openapi/pydantic and maintains support for oas 3.0.x and pydantic 1 + 2.
The only one I'm not sure of in the above is the ref resolver, not sure if it would bloat the surface area of the project too much to be opinionated on it, as we try to defer to Pydantic for most of the heavy lifting on the JSONSchema side. Happy to hear a suggestion if you can suggest an elegant enough API for it 👍🏼
Resolving references is actually quite simple.
It could be a method in OpenAPI and a couple of helper functions. I have the code already in my project, I'll prepare a PR.
@mike-oakley you don't think running mypy on tests is an overkill?
Some enhancements I'd be happy port from my project:
str
)example
andexamples
is definedAlso, Paths could be changed tothis is validdict[str, PathItem | Reference]
, andref
could be removed fromPathItem
.content
andschema