Skip to content

Commit 9878b5b

Browse files
build(lapis): use files relative to rootDir when building openapi specs
The openapi gradle plugin changed the working dir from project root to a temp dir in build/: springdoc/springdoc-openapi-gradle-plugin#142
1 parent 9b69725 commit 9878b5b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lapis/build.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,17 @@ openApi {
9494
if (segmented_ == "true") {
9595
return "../lapis-e2e/testData/multiSegmented/testDatabaseConfig.yaml"
9696
} else {
97-
return opennessLevel_ == "open" ? "../lapis-e2e/testData/singleSegmented/testDatabaseConfig.yaml" : "../lapis-e2e/testData/singleSegmented/protectedTestDatabaseConfig.yaml"
97+
return opennessLevel_ == "open"
98+
? "$rootDir/../lapis-e2e/testData/singleSegmented/testDatabaseConfig.yaml"
99+
: "$rootDir/../lapis-e2e/testData/singleSegmented/protectedTestDatabaseConfig.yaml"
98100
}
99101
}
100102

101103
def getReferenceGenomeFilename = { segmented_ ->
102104
if (segmented_ == "true") {
103-
return "../lapis-e2e/testData/multiSegmented/reference_genomes.json"
105+
return "$rootDir/../lapis-e2e/testData/multiSegmented/reference_genomes.json"
104106
} else {
105-
return "../lapis-e2e/testData/singleSegmented/reference_genomes.json"
107+
return "$rootDir/../lapis-e2e/testData/singleSegmented/reference_genomes.json"
106108
}
107109
}
108110

@@ -118,7 +120,7 @@ openApi {
118120
"--silo.url=does.not.matter.here",
119121
"--lapis.databaseConfig.path=$customLapisConfig",
120122
"--referenceGenomeFilename=$referenceGenomeFilename",
121-
"--lapis.accessKeys.path=./src/test/resources/config/testAccessKeys.yaml"
123+
"--lapis.accessKeys.path=$rootDir/src/test/resources/config/testAccessKeys.yaml"
122124
])
123125
}
124126
}

0 commit comments

Comments
 (0)