pb33f / libopenapi

libopenapi is a fully featured, high performance OpenAPI 3.1, 3.0 and Swagger parser, library, validator and toolkit for golang applications.
https://pb33f.io/libopenapi/
Other
482 stars 64 forks source link

fix: fixed extraction of top level named examples to not extract schema level examples #312

Closed TristanSpeakEasy closed 3 months ago

TristanSpeakEasy commented 3 months ago

This fixes an issues where the schema level examples were wrongly being extracted and didn't properly match the shape of the top level named examples.

This PR ensures only the right examples are extracted

TristanSpeakEasy commented 3 months ago

@daveshanley would appreciated a review

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 99.61%. Comparing base (6708cf0) to head (cb257f7).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #312 +/- ## ======================================= Coverage 99.61% 99.61% ======================================= Files 162 162 Lines 16305 16305 ======================================= Hits 16243 16243 Misses 57 57 Partials 5 5 ``` | [Flag](https://app.codecov.io/gh/pb33f/libopenapi/pull/312/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/pull/312/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pb33f) | `99.61% <100.00%> (ø)` | | 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.