feat: CLI option to define output directory
Not sure if I'm the only one, but I like to put (all) the generated clients together in a folder for the same project. Maybe it needs some clarification that you change the folder where the generated client is saved, not the name of the generated folder, but not sure if that is needed. If people think this is a bad idea, let me know so maybe I change my mind ;-)
- [ ] Tests
- [ ] Codestyle
- [ ] ..?
Just for your perusal, this may be related to https://github.com/openapi-generators/openapi-python-client/discussions/237 .
hey guys, I would like to have this too! do you need any help with this PR? this feature looks pretty straightforward
To be clear, the intended behavior is the same as if the user had switched into the passed output directory themselves (e.g., with cd) before running the command?
I want this option too because it's more comfortable to use output option instead switching of folder. Also it would be better to not create another folder in output folder during build
It would be nice to add the ability to generate the SDK directly into an existing folder
Example:
I have `sdk_folder`
Then run
$ openapi-python-client generate --path path/to/spec --output sdk_folder
Then I got `sdk_folder` with generated sdk instead of `sdk_folder/project_name`
It may also make sense to add the --overwrite-if-exists flag for this