-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schema for iso3166.CountryCode
is not OpenAPI 3.0 compatible (?)
#197
Comments
As discussed offline, phantom-types advertises support for Pydantic, not for OpenAPI directly. Pydantic uses If it turns out that the combining for instance FastAPI + Pydantic + phantom-types produces an illegal schema due to the |
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: