KittyCAD/third-party-api-clients

Should specify version of openapitor

Closed this issue · 4 comments

This repo uses openapitor to generate all its code. It uses whichever openapitor binary is available on the local filesystem (either under $PATH or in ../kittycad.rs/openapitor).

The problem is that openapitor is under active development and sometimes has breaking changes. But this repo doesn't specify which version of openapitor was used to generate its code. This means you can't reproduce this repo's generated code, because you don't know which version of openapitor was used to generate it.

E.g. right now, if I run "make commonroom" in the repo, openapitor fails, probably because I'm using the wrong version.

Solutions

  • Instead of invoking an openapitor binary from the local filesystem, this repo's Make targets should git clone openapitor from a certain Git rev, then cargo run it.
  • Maybe instead of git clone, this repo should include openapitor as a submodule.
  • Maybe instead, just make openapitor output which git hash generated the code, in a comment. Then developers know which version of openapitor can reproduce this repo.

org-projects-app[bot] added this issue to KittyCode Project.

@jessfraz curious what you think, you've worked with these codegen tools more than I

omg yes, we should def do one of these, I dont really have opinions on which one, but I have hit something before where my local copy was out of date!

I think we should

  • include openapitor as a submodule
  • add a make all target
  • ensure all the make targets use the openapitor submodule
  • unit test to make sure the output of make all matches the generated output in this repo