@@ -5,8 +5,8 @@ plugins {
5
5
id ' org.springframework.boot' version ' 2.1.7.RELEASE'
6
6
id ' org.unbroken-dome.test-sets' version ' 2.1.1'
7
7
8
- // add generatr -gradle plugin
9
- id ' com.github.hauner.openapi-generatr ' version ' 1.0.0.M5 '
8
+ // add processor -gradle plugin
9
+ id ' com.github.hauner.openapi-processor ' version ' 1.0.0.M7 '
10
10
}
11
11
12
12
group = ' com.github.hauner'
@@ -29,22 +29,22 @@ dependencies {
29
29
}
30
30
31
31
32
- // configure an openapi-generatr inside the 'openapiGeneratr ' configuration by adding a nested
33
- // configuration with the name of the generatr and its options inside it.
32
+ // configure an openapi-processor inside the 'openapiProcessor ' configuration by adding a nested
33
+ // configuration with the name of the openapi-processor and its options inside it.
34
34
//
35
35
// ... using 'spring' and 'json'.
36
- openapiGeneratr {
36
+ openapiProcessor {
37
37
38
- // the path to the open api yaml file. Usually the same for all generatrs .
38
+ // the path to the open api yaml file. Usually the same for all processors .
39
39
apiPath " ${ projectDir} /src/api/openapi.yaml"
40
40
41
- // based on the name of a generatr configuration the plugin creates a gradle task with name
42
- // "generate ${name of generator }" (in this case "generateSpring ") to run the generatr .
41
+ // based on the name of the processor configuration the plugin creates a gradle task with name
42
+ // "process ${name of processor }" (in this case "processSpring ") to run the processor .
43
43
spring {
44
- // the spring generatr dependency
45
- generatr ' com.github.hauner.openapi:openapi-generatr -spring:1.0.0.M7 '
44
+ // the spring processor dependency
45
+ processor ' com.github.hauner.openapi:openapi-processor -spring:1.0.0.M9 '
46
46
47
- // setting api path inside a generatr configuration override the one at the top.
47
+ // setting api path inside a processor configuration overrides the one at the top.
48
48
// apiPath "${projectDir}/src/api/openapi.yaml"
49
49
50
50
// the destination folder for generating interfaces & models. This is the parent of the
@@ -53,23 +53,23 @@ openapiGeneratr {
53
53
54
54
// file name of the mapping yaml configuration file. Note that the yaml file name must end
55
55
// with either {@code .yaml} or {@code .yml}.
56
- mapping " $projectDir /openapi-generatr-spring .yaml"
56
+ mapping " ${ projectDir} /src/api/mapping .yaml"
57
57
58
58
// show warnings from the open api parser.
59
59
showWarnings true
60
60
}
61
61
62
- // applying the rule described above the task to run this one is "generateJson ".
62
+ // applying the rules described above the task to run this one is "processJson ".
63
63
json {
64
- // the json generatr dependency
65
- generatr ' com.github.hauner.openapi:openapi-generatr -json:1.0.0.M2 '
64
+ // the json processor dependency
65
+ processor ' com.github.hauner.openapi:openapi-processor -json:1.0.0.M3 '
66
66
67
67
targetDir " $buildDir /json"
68
68
}
69
69
70
70
}
71
71
72
- // add the targetDir of the generatr as additional source folder to java.
72
+ // add the targetDir of the processor as additional source folder to java.
73
73
sourceSets {
74
74
main {
75
75
java {
@@ -84,7 +84,7 @@ sourceSets {
84
84
}
85
85
86
86
// generate api before compiling
87
- compileJava. dependsOn (' generateSpring ' )
88
- processResources. dependsOn (' generateJson ' )
87
+ compileJava. dependsOn (' processSpring ' )
88
+ processResources. dependsOn (' processJson ' )
89
89
90
90
check. dependsOn testInt
0 commit comments