cli
cli copied to clipboard
[dev] refactor CLI operations/commands to extract core API and make it reusable outside of the CLI
I’ve been building a tool (https://github.com/denismakogon/fn-openapi-v3) that generates OpenAPI V3 spec out of (my own) Function’s spec file. At this moment, I’ve been trying to design and develop a tool that will take Function’s spec file do the following:
- generate a bunch of functions with their boilerplate from pre-defined
func.yml(see https://github.com/fnproject/cli/issues/371) - generate request/response content verification code (TBD)
- deploy functions and an HTTP triggers
- construct an OpenAPI V3 spec for further client code generation (or whatever)
So, I’d like to reuse certain parts of CLI code (boilerplate generation, etc.) and I need to refactor most of the operations implemented to make them reusable outside of CLI. Any objections on this?
I think I'd like to see more detail on exactly how you propose to refactor the CLI, e.g. a PR that shows a thin vertical slice through the CLI demonstrating what would change.