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

Update Operations to act as wrapper of wrapped view function #1669

Merged
merged 1 commit into from
Mar 6, 2023

Conversation

RobbeSneyders
Copy link
Member

Fixes #1666

The FlaskOperation and AsyncOperation classes act as decorators for their wrapped view functions, so their metadata should reflect this, similar to what functools.wraps does.

@RobbeSneyders RobbeSneyders added this to the Connexion 3.0 milestone Mar 5, 2023
@coveralls
Copy link

coveralls commented Mar 6, 2023

Pull Request Test Coverage Report for Build 4341705569

  • 4 of 4 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 93.242%

Totals Coverage Status
Change from base Build 4321937364: 0.004%
Covered Lines: 3270
Relevant Lines: 3507

💛 - Coveralls

Copy link
Member

@Ruwann Ruwann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL about functools.update_wrapper - feels weird to apply it to a class but as long as it 'quacks' like a function :)

@RobbeSneyders
Copy link
Member Author

They're not functions, but they are callables :)

@RobbeSneyders RobbeSneyders merged commit e9b28d4 into main Mar 6, 2023
@RobbeSneyders RobbeSneyders deleted the bugfix/operation-decorator branch March 6, 2023 20:47
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.

name and qual name appear to be missing from decorated flask operation
3 participants