Skip to content
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

[Feature] - Support Pydantic 2 and remove support for Pydantic V1 #70

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

cgearing
Copy link
Contributor

@cgearing cgearing commented Aug 11, 2024

This PR updates Flask-Pydantic-Spec to only support Pydantic V2. After this PR is merged, only Pydantic V2 will be supported by Flask-Pydantic-Spec.

As part of this upgrade, we have decided to fully target OpenAPI 3.1 as the output of the library. As such, there are a few changes to keep in mind.

  1. It's not valid in OpenAPI 3.1 for a path to not return some kind of response, and if it does, it should be a successful response. As such, Flask-Pydantic-Spec will now raise an error if there is no response defined for a view.
  2. [ and ] is not allowed in the name of the schema, so we will replace these character with _.
  3. Expands testing to also run against Python 3.12
  4. Updates Flake8 dependency to latest

pyproject.toml Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants