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
@@ -151,15 +150,15 @@ The `templateDir` variable refers to the "current" template directory setting, a
151
150
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.
152
151
153
152
```java
154
-
apiPackage =File.separator +"Apis";
153
+
apiPackage ="Apis";
155
154
```
156
155
157
156
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.
158
157
159
158
Every templated output from `api.mustache` (registered via `apiTemplateFiles` above) will end up in the directory defined by `apiPackage` here.
160
159
161
160
```java
162
-
modelPackage =File.separator +"Models";
161
+
modelPackage ="Models";
163
162
```
164
163
165
164
Similarly, this sets the package for `Models`.
@@ -330,61 +329,29 @@ To compile quickly to test this out, you can run `mvn clean package -DskipTests`
330
329
331
330
### Compile Sample
332
331
333
-
The `new.sh` script created `bin/common-mark-documentation-petstore.sh`:
332
+
The `new.sh` script created the generation config file `bin/configs/common-mark-documentation-petstore-new.yaml`:
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:
343
+
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.
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`).
354
+
388
355
### Verify output
389
356
390
357
Creating a new generator will be an iterative task. Once you've generated the sample, you'll want to try it out. For compiled client/server outputs, this would mean running the code or creating a small sample project to consume your artifact just to make sure it works.
0 commit comments