go-apiops icon indicating copy to clipboard operation
go-apiops copied to clipboard

chore: replaced kin-openapi library with libopenapi

Open Prashansa-K opened this issue 1 year ago • 2 comments

deck file openapi2kong command uses kin-openapi for all its OpenAPI requirements. This library does not support OpenAPI 3.1, which is a requirement from the users. Thus, this change updates the library to libopenapi which can help us to adopt OpenAPI 3.1

For APIOps #1324 https://github.com/Kong/deck/issues/1324


I didn't add much code refactoring in this PR for the aid of the review. I will take that up in a different PR.

Prashansa-K avatar Aug 14 '24 10:08 Prashansa-K

Codecov Report

Attention: Patch coverage is 75.66667% with 73 lines in your changes missing coverage. Please review.

Project coverage is 68.19%. Comparing base (e464df7) to head (d14c3ed).

Files Patch % Lines
openapi2kong/openapi2kong.go 68.78% 27 Missing and 27 partials :warning:
openapi2kong/utils.go 82.75% 8 Missing and 2 partials :warning:
openapi2kong/jsonschema.go 78.12% 3 Missing and 4 partials :warning:
openapi2kong/validator.go 92.85% 1 Missing and 1 partial :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #194      +/-   ##
==========================================
+ Coverage   67.86%   68.19%   +0.33%     
==========================================
  Files          23       24       +1     
  Lines        2505     2550      +45     
==========================================
+ Hits         1700     1739      +39     
+ Misses        644      643       -1     
- Partials      161      168       +7     

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

codecov-commenter avatar Aug 14 '24 10:08 codecov-commenter

nice work @Prashansa-K !! Added some minor comments. Note that I don't know this go-apiops library so I think this work seems safe if the test suite and coverage are good.

Thank you! I will also test this out with some more examples to be thorough.

Prashansa-K avatar Aug 19 '24 07:08 Prashansa-K