Skip to content

Commit d5c1c4d

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 d5c1c4d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lapis/build.gradle

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,19 @@ openApi {
9292

9393
def getCustomLapisConfig = { opennessLevel_, segmented_ ->
9494
if (segmented_ == "true") {
95-
return "../lapis-e2e/testData/multiSegmented/testDatabaseConfig.yaml"
95+
return "$rootDir/../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)