This works with any loading script named openapi-generator-cli. That is, if you've installed via homebrew or created a script similar to https://gist.github.com/jimschubert/ce241b0c78140e364f46914ef8ec4103
This script is relatively simple, relying on fallback to the recently add "completion" command to the CLI project.
The script includes a possible extension to allow for per-language options to autocomplete when the user is applying additional properties. This work is currently commented out, as it may be simplified a bit in the CLI first.
To evaluate, you'll need the script from the gist mentioned above saved somewhere on your path and made executable (chmod u+x openapi-generator-cli
). Then install bash completions if you don't already have it installed:
brew install bash-completion
Rather than permanently installing the completion script, you can just source it in your current shell session:
source openapi-generator-cli-completion.bash
Now you can TABTAB for autocomplete suggestions.
@wing328 we'll want to add this to homebrew, but this will only be available after the next artifact is released.
see #214
PR checklist
-
Read the contribution guidelines. -
Ran the shell script under ./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
. -
Filed the PR against the correct branch: Default: master
. -
Copied the technical committee to review the pull request if your PR is targeting a particular programming language.
Description of the PR
(details of the change, additional tests that have been done, reference to the issue for tracking, etc)