Skip to content

Fix and enhance the class-based view support#392

Merged
greyli merged 1 commit intomainfrom
fix-cbv
Jan 8, 2023
Merged

Fix and enhance the class-based view support#392
greyli merged 1 commit intomainfrom
fix-cbv

Conversation

@greyli
Copy link
Copy Markdown
Member

@greyli greyli commented Jan 8, 2023

  • Create apiflask.views module
  • Raise error if using MethodView from flask.views
  • Refactor the code to collect spec from view classes
  • Remove the Flask<2.2 restriction

fixes #341

Checklist:

  • Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
  • Add or update relevant docs, in the docs folder and in code docstring.
  • Add an entry in CHANGES.md summarizing the change and linking to the issue and your username.
  • Add *Version changed* or *Version added* note in any relevant docs and docstring.
  • Run pytest and tox, no tests failed.

- Create apiflask.views module
- Raise error if using MethodView from flask.views
- Refactor the code to collect spec from view classes
- Remove the Flask<2.2 restriction
@greyli greyli merged commit 61b018c into main Jan 8, 2023
@greyli greyli deleted the fix-cbv branch January 8, 2023 13:09
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.

Using class-based views with Flask 2.2 causes TypeError: view() takes 0 positional arguments but 1 was given

1 participant