openapi-python-client icon indicating copy to clipboard operation
openapi-python-client copied to clipboard

Allow specifying `project_dir` from within a --config file

Open Julian opened this issue 3 years ago • 0 comments

I'm only a day or two into using the project, which seems quite nice, so apologies if I'm missing this:

Is your feature request related to a problem? Please describe. It seems there isn't a way to specify where the root of a project lives, and openapi-python-client assumes that cwd is the parent of where it lives. That makes it a bit awkward to execute openapi-python-client update (it means one basically needs to do so from a directory up from where I'd expect) once you already have a git repository with a generated client that you're maintaining.

Describe the solution you'd like One or both of:

  • assume that the project_dir is relative to --config when provided (i.e. that someone has placed the --config inside their project_dir, so start there)
  • add a project_dir option to config files themselves which specifies, relative to the file itself, where the project lives (and when not present, default to cwd I suppose as is assumed now).

Describe alternatives you've considered Only doing one or the other of the above.

Thanks again!

Julian avatar Oct 11 '22 16:10 Julian