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
Anyways, removing examples from there everything works fine. Perhaps it should move someplace else? I tried moving it on the "root" level of the field object (sibling to anyOf) but that didn't work either.
The text was updated successfully, but these errors were encountered:
As discussed offline, phantom-types advertises support for Pydantic, not for OpenAPI directly.
Pydantic uses "examples" in their documentation so it feels like this should be opened as an issue there. I suspect a framework could be made aware of when and where "examples" is allowed, and omit it when needed, though I have no idea if that is something that's implemented or not.
If it turns out that the combining for instance FastAPI + Pydantic + phantom-types produces an illegal schema due to the "examples" key, I'll consider removing it! 🙂
I have a pydantic model set up like this:
Then I run a OpenAPI schema validator against the generated schema found here: https://github.com/p1c2u/openapi-spec-validator
Getting an issue in the
anyOf
below, onexamples
. Not sure if it's misplaced?Anyways, removing
examples
from there everything works fine. Perhaps it should move someplace else? I tried moving it on the "root" level of the field object (sibling toanyOf
) but that didn't work either.The text was updated successfully, but these errors were encountered: