• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

spec-first / connexion / 6724414581
94%

Build:
DEFAULT BRANCH: main
Ran 01 Nov 2023 07:58PM UTC
Jobs 5
Files 53
Run time 5s
Badge
Embed ā–¾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Nov 2023 07:53PM UTC coverage: 94.237% (+0.006%) from 94.231%
6724414581

push

github

web-flow
Improve JSON req error on disallowed empty body (#1761)

Fixes #1152.

Currently, when a request body is empty, the JSON request validator
would parse it into None, which is later passed down to the JSON Schema
validator. However, jsonschema's validation error message for this case
(when nullable is false) "None is not of type 'object'" is not
particularly friendly to either the API user, nor the website developer.

This change adds a specific check before the None value is passed to
jsonschema to emit a better error message directly.

I also added some drive-by improvements on function argument typing
since _validate in validators don't seem to expect receiving None, but
_parse (the result of which is passed to _validate) is totally allowed
to return None (or anything really). This does not seem to reflect the
logic well.

I’m not exactly sure if this is the best way to do this in Connexion
3.x. [We do have a patch in Connexion 2.x to achieve a similar
effect](https://github.com/apache/airflow/commit/e89a7eeea)
so if anyone understands how the two implementations correspond please
tell me whether the two do the same thing šŸ™‚

---------

Co-authored-by: Robbe Sneyders <robbe.sneyders@ml6.eu>

7 of 8 new or added lines in 2 files covered. (87.5%)

3565 of 3783 relevant lines covered (94.24%)

4.7 hits per line

Jobs
ID Job ID Ran Files Coverage
1 test-3.8 - 6724414581.1 01 Nov 2023 08:09PM UTC 0
94.22
2 test-3.10 - 6724414581.2 01 Nov 2023 08:09PM UTC 0
94.24
3 test-3.9 - 6724414581.3 01 Nov 2023 08:09PM UTC 0
94.22
4 test-3.12 - 6724414581.4 01 Nov 2023 08:09PM UTC 0
94.24
5 test-3.11 - 6724414581.5 01 Nov 2023 08:09PM UTC 0
94.24
Source Files on build 6724414581
Detailed source file information is not available for this build.
  • Back to Repo
  • 9c02fdfa on github
  • Prev Build on main (#6724228839)
  • Next Build on main (#6724425649)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc