File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
src/main/kotlin/org/modelix/model/server Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -4,5 +4,4 @@ EXPOSE 28101
4
4
COPY run-model-server.sh /usr/modelix-model/
5
5
COPY build/dependency-libs/ /usr/modelix-model/model-server/build/libs/
6
6
COPY build/libs/ /usr/modelix-model/model-server/build/libs/
7
- COPY api/*.yaml /usr/modelix-model/api/
8
7
ENTRYPOINT ["./run-model-server.sh" ]
Original file line number Diff line number Diff line change @@ -120,14 +120,18 @@ val cucumber = task("cucumber") {
120
120
tasks.register<Copy >(" copyApis" ) {
121
121
from(" ../api/" )
122
122
include(" *.yaml" )
123
- into(project.layout.projectDirectory.dir(" api" ))
123
+ into(project.layout.projectDirectory.dir(" src/main/resources/ api" ))
124
124
}
125
125
126
126
tasks.named(" build" ) {
127
127
dependsOn(" cucumber" )
128
128
dependsOn(" copyApis" )
129
129
}
130
130
131
+ tasks.named(" processResources" ) {
132
+ dependsOn(" copyApis" )
133
+ }
134
+
131
135
task(" copyLibs" , Sync ::class ) {
132
136
into(project.layout.buildDirectory.dir(" dependency-libs" ))
133
137
from(configurations.runtimeClasspath)
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ import org.modelix.model.server.store.loadDump
63
63
import org.modelix.model.server.store.writeDump
64
64
import org.modelix.model.server.templates.PageWithMenuBar
65
65
import org.slf4j.LoggerFactory
66
+ import org.springframework.util.ResourceUtils
66
67
import java.io.File
67
68
import java.io.IOException
68
69
import java.nio.charset.StandardCharsets
@@ -239,7 +240,7 @@ object Main {
239
240
}
240
241
} else {
241
242
// we only serve the public API to the outside via swagger UI
242
- swaggerUI(path = " swagger" , swaggerFile = " api/model-server.yaml" )
243
+ swaggerUI(path = " swagger" , swaggerFile = ResourceUtils .getFile( " api/model-server.yaml" ).path.toString() )
243
244
}
244
245
}
245
246
}
You can’t perform that action at this time.
0 commit comments