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

Fix for bug of the function is_json_mimetype() #1541

Merged
merged 6 commits into from
May 31, 2022

Conversation

jacobstanly89
Copy link
Contributor

@jacobstanly89 jacobstanly89 commented May 19, 2022

Fixes #1114

Changes proposed in this pull request:

  • In the file connexion/utils.py, under function is_json_mimetype() the following has been added to take into account the ';' that might be present in the mimetype

if ';' in subtype: subtype, parameter = subtype.split(';')

  • Added the corresponding tests in tests/test_utils.py

@jacobstanly89 jacobstanly89 changed the title Fix for bug of the function is_json_mimetype() (#1114) Fix for bug of the function is_json_mimetype() May 24, 2022
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.

Thanks for the PR!

Could you also add a test for this? It can be added in tests/test_utils.py

connexion/utils.py Show resolved Hide resolved
@coveralls
Copy link

coveralls commented May 24, 2022

Pull Request Test Coverage Report for Build 2416476643

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

Totals Coverage Status
Change from base Build 2379282948: 0.004%
Covered Lines: 2651
Relevant Lines: 2810

💛 - Coveralls

connexion/utils.py Outdated Show resolved Hide resolved
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.

Thanks a lot, @jacobstanly89 !

@Ruwann Ruwann merged commit b561ecf into spec-first:main May 31, 2022
@jacobstanly89 jacobstanly89 deleted the json_mimetype branch June 3, 2022 14:46
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.

bug of the function is_json_mimetype() in the file connexion/utils.py
3 participants