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

chore: update to use iterators on orderedmaps #319

Closed TristanSpeakEasy closed 3 months ago

TristanSpeakEasy commented 3 months ago

This PR adds support for the iterators being added to the ordered map library, this cleans up the DevEx when working with ordered maps in the high level models but has also cleaned up a bunch of the implementation code as well

I have linked to my fork of the iterators change for now, but I can hold of this PR (just let me know) until its merged into the library

https://github.com/wk8/go-ordered-map/pull/41

Just some notes about things I noticed while doing this refactor:

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 99.65%. Comparing base (c3eb16d) to head (ae88d35). Report is 6 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #319 +/- ## ========================================== + Coverage 99.63% 99.65% +0.01% ========================================== Files 164 164 Lines 16608 16586 -22 ========================================== - Hits 16547 16528 -19 + Misses 56 53 -3 Partials 5 5 ``` | [Flag](https://app.codecov.io/gh/pb33f/libopenapi/pull/319/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/319/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pb33f) | `99.65% <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.

TristanSpeakEasy commented 3 months ago

a draft until the underlying dependency is merged otherwise we either need to use speakeasy's fork without a replace statement or everyone needing to use this version has to add their own replace statement

daveshanley commented 3 months ago

I will need to look at this in depth, thank you for this work!

TristanSpeakEasy commented 3 months ago

I will need to look at this in depth, thank you for this work!

@daveshanley we have integrated this branch into the speakeasy products and its working as expected and much nicer devex

TristanSpeakEasy commented 3 months ago

no longer using a replace directive so good to go

petkostas commented 3 months ago

I started testing the specific PR, and it looks like it is working as expected! Thanks a lot, @TristanSpeakEasy