|
1 |
| -// TODO: Put public facing types in this file. |
2 |
| -/// Checks if you are awesome. Spoiler: you are. |
3 |
| -class Awesome { |
4 |
| - bool get isAwesome => true; |
5 |
| -} |
6 |
| - |
7 |
| -abstract class OpenapiGeneratorConfig { |
8 |
| - Map<String, String> additionalProperties; |
9 |
| - String inputSpecFile; |
10 |
| - String generator; |
11 |
| - String outputDirectory; |
12 |
| - |
13 |
| - /// specifies if the existing files should be overwritten during the generation |
14 |
| - /// -s, --skip-overwrite |
15 |
| - bool overwriteExistingFiles; |
16 |
| -} |
| 1 | +/// Config base class |
| 2 | +/// Your annotated class must extend this config class |
| 3 | +abstract class OpenapiGeneratorConfig {} |
17 | 4 |
|
18 | 5 | class Openapi {
|
19 |
| - final String baseUrl; |
20 |
| - |
| 6 | + /// Additional properties to pass to tge compiler (CSV) |
| 7 | + /// --additional-properties |
21 | 8 | final AdditionalProperties additionalProperties;
|
| 9 | + |
| 10 | + /// relative path or url to spec file |
| 11 | + /// -i |
22 | 12 | final String inputSpecFile;
|
23 | 13 |
|
24 |
| - /// generator to use (see list command for list) |
| 14 | + /// Generator to use (see list command for list) |
25 | 15 | /// -g, --generator-name
|
26 | 16 | final String generatorName;
|
27 | 17 |
|
28 |
| - /// where to write the generated files (current dir by default) |
| 18 | + /// Where to write the generated files (current dir by default) |
29 | 19 | /// -o, --output
|
30 | 20 | final String outputDirectory;
|
31 | 21 |
|
32 |
| - /// specifies if the existing files should be overwritten during the generation |
| 22 | + /// Specifies if the existing files should be overwritten during the generation |
33 | 23 | /// -s, --skip-overwrite
|
34 | 24 | final bool overwriteExistingFiles;
|
35 | 25 |
|
36 | 26 | /// Skips the default behavior of validating an input specification.
|
37 | 27 | /// --skip-validate-spec
|
38 |
| - final bool validateSpec; |
| 28 | + final bool skipValidateSpec; |
| 29 | + |
| 30 | + /// Tells openapi-generator to always run during the build process |
| 31 | + /// if set to false (the default), openapi-generator will skip processing if the [outputDirectory] already exists |
| 32 | + final bool alwaysRun; |
39 | 33 |
|
40 | 34 | const Openapi(
|
41 | 35 | {this.additionalProperties,
|
42 | 36 | this.overwriteExistingFiles,
|
43 |
| - this.validateSpec = true, |
| 37 | + this.skipValidateSpec = false, |
44 | 38 | this.inputSpecFile,
|
45 | 39 | this.generatorName,
|
46 | 40 | this.outputDirectory,
|
47 |
| - this.baseUrl}); |
| 41 | + this.alwaysRun = false}); |
48 | 42 | }
|
49 | 43 |
|
50 | 44 | class AdditionalProperties {
|
|
0 commit comments