danielgtaylor / restish

Restish is a CLI for interacting with REST-ish HTTP APIs with some nice features built-in
https://rest.sh/
MIT License
900 stars 74 forks source link

allow remote references in open-api specs #202

Closed zak905 closed 1 year ago

zak905 commented 1 year ago

closes #203

zak905 commented 1 year ago

@danielgtaylor, just a reminder about this. Are you interested in having this in upstream ?

zak905 commented 1 year ago

FYI, I submitted a patch to the libopenapi which was accepted: https://github.com/pb33f/libopenapi/pull/142

danielgtaylor commented 1 year ago

@zak905 sorry about the delay, I will look at and test this out ASAP. Any updates to libopenapi require a bunch of testing on my part as I can't break existing customers (we use Restish in a lot of production workflows).

The diff looks great, my hesitation now is just around testing / verification with existing OpenAPI specs.

zak905 commented 1 year ago

Thanks for the update @danielgtaylor. In principle, the changes I introduced to libopenapi should preserve the backward compatibility. However, I guess a lot happened since version 0.4, so it's worth double checking, as you said. Concerning the current breaking tests, the cause was some data type changes from int64 to float64 in the github.com/pb33f/libopenapi/datamodel/high/base package. I addressed them in the latest commit, hopefully it should be ok.

codecov[bot] commented 1 year ago

Codecov Report

Merging #202 (4f4466f) into main (3a541b4) will increase coverage by 0.28%. Report is 6 commits behind head on main. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/danielgtaylor/restish/pull/202/graphs/tree.svg?width=650&height=150&src=pr&token=1BMagYibk9&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor)](https://app.codecov.io/gh/danielgtaylor/restish/pull/202?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor) ```diff @@ Coverage Diff @@ ## main #202 +/- ## ========================================== + Coverage 75.37% 75.66% +0.28% ========================================== Files 26 26 Lines 3513 3550 +37 ========================================== + Hits 2648 2686 +38 + Misses 666 665 -1 Partials 199 199 ``` | [Files Changed](https://app.codecov.io/gh/danielgtaylor/restish/pull/202?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor) | Coverage Δ | | |---|---|---| | [openapi/openapi.go](https://app.codecov.io/gh/danielgtaylor/restish/pull/202?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor#diff-b3BlbmFwaS9vcGVuYXBpLmdv) | `87.91% <100.00%> (ø)` | | | [openapi/schema.go](https://app.codecov.io/gh/danielgtaylor/restish/pull/202?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor#diff-b3BlbmFwaS9zY2hlbWEuZ28=) | `98.43% <100.00%> (ø)` | | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/danielgtaylor/restish/pull/202/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/danielgtaylor/restish/pull/202?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/danielgtaylor/restish/pull/202?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor). Last update [3a541b4...4f4466f](https://app.codecov.io/gh/danielgtaylor/restish/pull/202?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor).