Skip to content
This repository was archived by the owner on Mar 14, 2021. It is now read-only.

Commit 3e193b8

Browse files
committed
updated to renamed openapi-processor
1 parent 5c142ff commit 3e193b8

File tree

5 files changed

+33
-29
lines changed

5 files changed

+33
-29
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
# openapi-generatr-spring sample project
1+
# openapi-processor-spring sample project
22

3-
This is a simple Spring Boot project that is using the [openapi-generatr-spring][generatr-spring] to
4-
generate java interfaces for the api defined in an openapi.yaml file.
3+
This is a simple Spring Boot project that is using
4+
* [openapi-processor-spring][oap-spring] to
5+
generate java interfaces for the api defined in an openapi.yaml file and
6+
* the [openapi-processor-json][oap-json] to convert the openapi yaml to json format.
57

6-
The sample is based on gradle and uses the [generatr-gradle plugin][generatr-gradle].
78

8-
[generatr-spring]: https://hauner.github.io/openapi-generatr-spring/
9-
[generatr-gradle]: https://github.com/hauner/openapi-generatr-gradle
9+
The sample is based on gradle and uses the [openapi-processor-gradle plugin][oap-gradle].
10+
11+
[oap-spring]: https://hauner.github.io/openapi-processor-spring/
12+
[oap-json]: https://hauner.github.io/openapi-processor-json/
13+
[oap-gradle]: https://github.com/hauner/openapi-processor-gradle

build.gradle

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ plugins {
55
id 'org.springframework.boot' version '2.1.7.RELEASE'
66
id 'org.unbroken-dome.test-sets' version '2.1.1'
77

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'
1010
}
1111

1212
group = 'com.github.hauner'
@@ -29,22 +29,22 @@ dependencies {
2929
}
3030

3131

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.
3434
//
3535
// ... using 'spring' and 'json'.
36-
openapiGeneratr {
36+
openapiProcessor {
3737

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.
3939
apiPath "${projectDir}/src/api/openapi.yaml"
4040

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.
4343
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'
4646

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.
4848
// apiPath "${projectDir}/src/api/openapi.yaml"
4949

5050
// the destination folder for generating interfaces & models. This is the parent of the
@@ -53,23 +53,23 @@ openapiGeneratr {
5353

5454
// file name of the mapping yaml configuration file. Note that the yaml file name must end
5555
// with either {@code .yaml} or {@code .yml}.
56-
mapping "$projectDir/openapi-generatr-spring.yaml"
56+
mapping "${projectDir}/src/api/mapping.yaml"
5757

5858
// show warnings from the open api parser.
5959
showWarnings true
6060
}
6161

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".
6363
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'
6666

6767
targetDir "$buildDir/json"
6868
}
6969

7070
}
7171

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.
7373
sourceSets {
7474
main {
7575
java {
@@ -84,7 +84,7 @@ sourceSets {
8484
}
8585

8686
// generate api before compiling
87-
compileJava.dependsOn ('generateSpring')
88-
processResources.dependsOn ('generateJson')
87+
compileJava.dependsOn ('processSpring')
88+
processResources.dependsOn ('processJson')
8989

9090
check.dependsOn testInt

settings.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
rootProject.name = 'openapi-generatr-spring-mvc-sample'
1+
rootProject.name = 'openapi-processor-spring-mvc-sample'
22

3-
//includeBuild '../openapi-generatr-gradle'
4-
//includeBuild '../openapi-generatr-spring'
5-
//includeBuild '../openapi-generatr-json'
3+
//includeBuild '../openapi-processor-gradle'
4+
//includeBuild '../openapi-processor-spring'
5+
//includeBuild '../openapi-processor-json'
File renamed without changes.

src/api/openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
openapi: 3.0.2
22
info:
3-
title: sample api for openapi-generatr-spring
3+
title: openapi-processor-spring sample api
44
version: 1.0.0
55

66
paths:

0 commit comments

Comments
 (0)