diff --git a/docs/usage.md b/docs/usage.md index 3ee12db6824..d7fd3092b1d 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -557,3 +557,85 @@ The name of the file should be `config.yml` or `config.yaml` (in our example it openapi-generator generate -i petstore.yaml -g typescript-fetch -o out \ -c config.yaml ``` + + +## batch + +The `batch` command allows you to move all CLI arguments supported by the `generate` command into a YAML or JSON file. + +*NOTE*: This command supports an additional `!include` property which may point to another "shared" file, the base path to which can be +modified by `--includes-base-dir`. + +```bash +openapi-generator help batch +NAME + openapi-generator-cli batch - Generate code in batch via external + configs. + +SYNOPSIS + openapi-generator-cli batch [--fail-fast] + [--includes-base-dir ] [(-r | --threads )] + [--root-dir ] [--timeout ] [(-v | --verbose)] [--] + ... + +OPTIONS + --fail-fast + fail fast on any errors + + --includes-base-dir + base directory used for includes + + -r , --threads + thread count + + --root-dir + root directory used output/includes (includes can be overridden) + + --timeout + execution timeout (minutes) + + -v, --verbose + verbose mode + + -- + This option can be used to separate command-line options from the + list of argument, (useful when arguments might be mistaken for + command-line options + + + Generator configuration files. +``` + +Example: + +```bash +# create "shared" config +mkdir shared && cat > shared/common.yaml < kotlin.yaml < csharp.yaml <