danielgtaylor / restish

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

fix: generate operation ID if not present, fixes #201 #213

Closed danielgtaylor closed 11 months ago

danielgtaylor commented 11 months ago

If an OpenAPI operation has no operation ID, then generate it using the method+path, converted to kebab casing. For example, GET /users/{user-id}/friendsget-users-user-id-friends. No attempt is made to infer what arguments might mean or whether something is a list vs get.

codecov[bot] commented 11 months ago

Codecov Report

Merging #213 (04a021c) into main (c47eb00) will increase coverage by 0.01%. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/danielgtaylor/restish/pull/213/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/213?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 #213 +/- ## ========================================== + Coverage 75.76% 75.78% +0.01% ========================================== Files 26 26 Lines 3574 3576 +2 ========================================== + Hits 2708 2710 +2 Misses 666 666 Partials 200 200 ``` | [Files Changed](https://app.codecov.io/gh/danielgtaylor/restish/pull/213?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/213?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor#diff-b3BlbmFwaS9vcGVuYXBpLmdv) | `88.53% <100.00%> (+0.05%)` | :arrow_up: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/danielgtaylor/restish/pull/213?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/213?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor). Last update [c47eb00...04a021c](https://app.codecov.io/gh/danielgtaylor/restish/pull/213?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).