pb33f / libopenapi-validator

OpenAPI validation extension for libopenapi, validate http requests and responses as well as schemas
https://pb33f.io/libopenapi/validation/
Other
55 stars 19 forks source link

Added base path stripping for the request path during path parameter … #59

Closed jacobm-splunk closed 7 months ago

jacobm-splunk commented 8 months ago

Path parameter validation did not properly strip the base path from the request path when doing parameter validation.

If the server had a non-null postfix path, then the incorrect parameter would be validated.

I added a test to exercise this scenario to ensure this shouldn't happen again.

codecov-commenter commented 7 months ago

Codecov Report

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

Project coverage is 98.96%. Comparing base (3397867) to head (e4974f6).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #59 +/- ## ======================================= Coverage 98.95% 98.96% ======================================= Files 19 19 Lines 1151 1156 +5 ======================================= + Hits 1139 1144 +5 Misses 12 12 ``` | [Flag](https://app.codecov.io/gh/pb33f/libopenapi-validator/pull/59/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pb33f) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/pb33f/libopenapi-validator/pull/59/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pb33f) | `98.96% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pb33f#carryforward-flags-in-the-pull-request-comment) to find out more.

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