falconry / falcon

The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.
https://falcon.readthedocs.io/en/stable/
Apache License 2.0
9.53k stars 945 forks source link

feat: generalize validators and support `jsonschema-rs` #2225

Open CaselIT opened 7 months ago

CaselIT commented 7 months ago

Summary of Changes

Extract a common interface for the validator logic, and add support for jsonschema-rs library

Related Issues

Fixes: #2224

CaselIT commented 7 months ago

The tests are missing for the new lib

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (9b27c71) to head (e17ae35). Report is 62 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2225 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 63 65 +2 Lines 6931 6987 +56 Branches 1258 1266 +8 ========================================= + Hits 6931 6987 +56 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

vytas7 commented 2 months ago

I love this improvement, but I would like to coordinate this with an App-wide OpenAPI spec, and App-wide media validators (we would support both ways, just as middleware and hooks coexist).

Unfortunately we won't be able to complete all this before the 4.0 release. Let's circle back on this for 4.1.