cli icon indicating copy to clipboard operation
cli copied to clipboard

[dev] refactor CLI operations/commands to extract core API and make it reusable outside of the CLI

Open denismakogon opened this issue 7 years ago • 1 comments

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?

denismakogon avatar Aug 09 '18 11:08 denismakogon

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.

rikgibson avatar Aug 09 '18 14:08 rikgibson