linode-cli icon indicating copy to clipboard operation
linode-cli copied to clipboard

Move to openapi3 for Linode CLI

Open Dorthu opened this issue 5 years ago • 1 comments

This is for us.

This requires:

  • [x] Dorthu/openapi3#21
  • [x] Dorthu/openapi3#24
  • [x] Dorthu/openapi3#25
  • [ ] https://github.com/Dorthu/openapi3/pull/52
  • [ ] https://github.com/Dorthu/openapi3/pull/53

Currently, the Linode CLI uses an OpenAPI parser that was written to our OpenAPI spec (at the time the CLI was written) and evolved slowly as issues were found. What's resulted is a very organic, free-range parser that exists specifically for the Linode CLI and is rather difficult to unwind and maintain.

This change removes the CLI's spec parser in favor of the openapi3 python package, which I wrote after completing the CLI as a proper spec parser, in part to replace the one in this project. The openapi3 package is already used to validate Linode's OpenAPI specification during automated builds, meaning that transitioning to this parser will ensure the doc's builds never fall out of sync with the CLI's capabilities.

⚠️ This is a major change, and will require manual testing.

Additional considerations:

  • [ ] Ensure all CLI-specific spec extensions are still supported
  • [ ] Ensure all first-party plugins function as needed
  • [ ] Adjust requirements for installation as necessary
  • [ ] How large of a version bump should this be? (in theory it's only a refactor, but it also has a lot of potential to break things unintentionally).

Notes to self:

  • [ ] The error message behavior in https://github.com/linode/linode-cli/pull/274 should be ported to this branch

Dorthu avatar Dec 15 '20 14:12 Dorthu

need to add the OpenAPI package to requirements, as you noted.

regarding the version change, i think given the scope it warrants a minor version bump. There's nothing inherently breaking and it would be confusing for customers to upgrade a major version bump for some under the hood changes.

patthiel avatar Jan 12 '21 14:01 patthiel

This was completed in #423; closing this branch

Dorthu avatar Jul 05 '23 14:07 Dorthu