Skip to content

feat: CLI option to define output directory #619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

JasperS2307
Copy link

@JasperS2307 JasperS2307 commented May 26, 2022

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
  • ..?

@JasperS2307 JasperS2307 marked this pull request as draft May 26, 2022 14:46
@dbanty
Copy link
Collaborator

dbanty commented Jun 3, 2022

Just for your perusal, this may be related to https://github.com/openapi-generators/openapi-python-client/discussions/237 .

@danielgafni
Copy link

hey guys, I would like to have this too! do you need any help with this PR? this feature looks pretty straightforward

@dbanty
Copy link
Collaborator

dbanty commented Sep 18, 2022

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?

@aletor123
Copy link

aletor123 commented Mar 17, 2023

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

@NikAzanov
Copy link

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

@dbanty
Copy link
Collaborator

dbanty commented Jun 8, 2024

This will be replaced by #1052

@dbanty dbanty closed this Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants