You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -150,15 +151,15 @@ The `templateDir` variable refers to the "current" template directory setting, a
150
151
Both of these variables exist because the generator will fallback to files under `embeddedTemplateDir` if they are not defined in the user's custom template directory.
151
152
152
153
```java
153
-
apiPackage ="Apis";
154
+
apiPackage =File.separator +"Apis";
154
155
```
155
156
156
157
This sets the "package" location for anything considered an API document. You might want to change this setting if, for instance, your language doesn't support uppercase letters in the path. We don't need to worry about that here.
157
158
158
159
Every templated output from `api.mustache` (registered via `apiTemplateFiles` above) will end up in the directory defined by `apiPackage` here.
159
160
160
161
```java
161
-
modelPackage ="Models";
162
+
modelPackage =File.separator +"Models";
162
163
```
163
164
164
165
Similarly, this sets the package for `Models`.
@@ -329,28 +330,60 @@ To compile quickly to test this out, you can run `mvn clean package -DskipTests`
329
330
330
331
### Compile Sample
331
332
332
-
The `new.sh` script created the generation config file `bin/configs/common-mark-documentation-petstore-new.yaml`:
333
+
The `new.sh` script created `bin/common-mark-documentation-petstore.sh`:
This configuration file is passed to the generator's CLI tool during continuous integration builds, and many outputs are compiled and tested as a regression test on every build. Contributors are also asked to run `./bin/utils/ensure-up-to-date` before opening a pull request to regenerate all samples defined under `./bin/configs`. This allows maintainers to quickly verify whether changes impact other generators.
338
+
SCRIPT="$0"
344
339
345
-
Configuration based examples allow us to test the same samples in each tooling option (CLI, Gradle Plugin, Maven Plugin, etc.).
This configuration file can be used to demonstrate the default options for generation. A common option in most of these configs is to define the template directory as the generator's directory under `resources`. This allows template maintainers to modify and test out template changes which don't require recompilation of the entire project. You'd still need to recompile the project in full if you add or modify behaviors to the generator (such as adding a `CliOption`).
369
+
This script is often used to apply default options for generation. A common option in most of these script is to define the template directory as the generator's directory under `resources`. This allows template maintainers to modify and test out template changes which don't require recompilation of the entire project. You'd still need to recompile the project in full if you add or modify behaviors to the generator (such as adding a `CliOption`).
370
+
371
+
Add `-t modules/openapi-generator/src/main/resources/common-mark-documentation` to `ags` line to simplify the evaluation of template-only modifications:
0 commit comments