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

Commit e849e5a

Browse files
committed
added generatr-json sample
1 parent b0c61ad commit e849e5a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ dependencies {
2525
// 'openapiGeneratr' is a custom configuration that is used by the gradle plugin. It allows
2626
// to add multiple generatrs.
2727
openapiGeneratr 'com.github.hauner.openapi:openapi-generatr-spring:1.0.0.M4'
28+
openapiGeneratr 'com.github.hauner.openapi:openapi-generatr-json:1.0.0.M2'
2829

2930
implementation 'org.springframework.boot:spring-boot-starter-web'
3031
testImplementation 'org.springframework.boot:spring-boot-starter-test'
@@ -61,6 +62,10 @@ openapiGeneratr {
6162
showWarnings true
6263
}
6364

65+
json {
66+
targetDir "$buildDir/json"
67+
}
68+
6469
}
6570

6671
// add the targetDir of the generatr as additional source folder to java.
@@ -70,10 +75,15 @@ sourceSets {
7075
// add generated files
7176
srcDir 'build/openapi'
7277
}
78+
79+
resources {
80+
srcDir "$buildDir/json"
81+
}
7382
}
7483
}
7584

7685
// generate api before compiling
7786
compileJava.dependsOn ('generateSpring')
87+
processResources.dependsOn ('generateJson')
7888

7989
check.dependsOn testInt

0 commit comments

Comments
 (0)