-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
55 lines (47 loc) · 1.44 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.5'
id 'io.spring.dependency-management' version '1.1.3'
id 'org.openapi.generator' version '7.0.1'
}
group = 'com.brendon'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '17'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.data:spring-data-commons'
implementation "org.springframework.boot:spring-boot-starter-validation"
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2'
implementation 'org.openapitools:jackson-databind-nullable:0.2.6'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
// mongodb
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
}
tasks.named('test') {
useJUnitPlatform()
}
openApiValidate {
inputSpec.set("$rootDir/specs/openapi.yaml")
}
openApiGenerate {
generatorName.set("spring")
inputSpec.set("$rootDir/specs/openapi.yaml")
outputDir.set("$rootDir/src/main")
packageName.set("com.brendon.crudcafe")
apiPackage.set("com.brendon.crudcafe.api")
invokerPackage.set("com.brendon.crudcafe.invoker")
modelPackage.set("com.brendon.crudcafe.model")
configOptions.set([
dateLibrary: "java8",
sourceFolder: "java",
configPackage:"com.brendon.crudcafe.configuration",
hideGenerationTimestamp: "true",
"useSpringBoot3": "true",
"useSpringController": "true"
])
}