Skip to content
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

feat(#644): add cli option for openapitools.json #754

Merged

Conversation

nicholasphair
Copy link
Contributor

This PR adds a command line argument, --openapitools, that allows a user to provide an openapitools.json file from the command line.

The current version of the cli hardcodes the location of this file.

Should resolve at least #644.

Disclaimer, I am not a typescript developer and did my best to get a feature I (and others seem to) need :)

@wing328
Copy link
Member

wing328 commented Mar 18, 2024

@nicholasphair thanks for the PR. May I know if you've time to perform some tests after we merge this and include it in a release?

@nicholasphair
Copy link
Contributor Author

My pleasure @wing328. I'd be happy to test out a new release with my builds. Thank you.

@wing328 wing328 merged commit 1d2a1a2 into OpenAPITools:master Mar 19, 2024
3 checks passed
@wing328
Copy link
Member

wing328 commented Mar 19, 2024

thanks. just merged it. it should be included in a new release soon.

@nicholasphair
Copy link
Contributor Author

Awesome. Thanks again.

Copy link

🎉 This PR is included in version 2.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@wing328
Copy link
Member

wing328 commented Mar 19, 2024

thanks again for the PR.

@nicholasphair
Copy link
Contributor Author

@wing328 As a test, I copied an openapitools.json file to my home directory, made sure the inputSpec arg pointed to the api definition, and then ran the build command from my tmp directory. All worked as I'd expect it to.

$ pwd
/tmp
$ openapi-generator-cli --openapitools ~/openapitools.json generate
...
... [main] INFO  o.o.codegen.TemplateManager - writing file /tmp/ApiClient/.openapi-generator/FILES
... 
$ test -e ApiClient && echo file exists
exists

Hope this helps.

@wing328
Copy link
Member

wing328 commented Mar 19, 2024

thanks for testing it.

@thekhegay
Copy link

@wing328 will be docs updated?

@wing328
Copy link
Member

wing328 commented Apr 9, 2024

@thekhegay I wonder if you can help file a PR to update the doc 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants