Skip to content

Commit 2101ea6

Browse files
authored
Make usage of !include more clear (#14724)
Fixes #14722
1 parent 9586099 commit 2101ea6

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

docs/usage.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ openapi-generator-cli generate -i petstore.yaml -g typescript-fetch -o out \
642642
The `batch` command allows you to move all CLI arguments supported by the `generate` command into a YAML or JSON file.
643643

644644
*NOTE*: This command supports an additional `!include` property which may point to another "shared" file, the base path to which can be
645-
modified by `--includes-base-dir`. Starting with 5.0.0, the `!batch` command supports multiple `!include` properties, either sequential or nested. In order to support multiple `!include` properties in a JSON file, the property name can have a suffix, e.g. `!include1`, `!include2`, etc. The suffix have no meaning other than providing unique property names.
645+
modified by `--includes-base-dir`. Starting with 5.0.0, the `!batch` command supports multiple `!include` properties, either sequential or nested under other keys. In order to support multiple `!include` properties in a JSON file, the property name can have a suffix, e.g. `!include1`, `!include2`, etc. The suffix have no meaning other than providing unique property names.
646646

647647
```text
648648
openapi-generator-cli help batch
@@ -697,6 +697,11 @@ additionalProperties:
697697
x-ext-name: "Your Name"
698698
EOF
699699
700+
# create nested "shared" config
701+
cat > shared/nested.yaml <<EOF
702+
useCompareNetObjects: "true"
703+
EOF
704+
700705
# create "standard" configs
701706
cat > kotlin.yaml <<EOF
702707
'!include': 'shared/common.yaml'
@@ -714,7 +719,7 @@ outputDir: out/csharp-netcore
714719
generatorName: csharp-netcore
715720
additionalProperties:
716721
packageGuid: "{321C8C3F-0156-40C1-AE42-D59761FB9B6C}"
717-
useCompareNetObjects: "true"
722+
'!include': 'shared/nested.yaml'
718723
EOF
719724
720725
# Generate them

0 commit comments

Comments
 (0)