mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Add more properties to upload meta data
This commit is contained in:
22
build.sbt
22
build.sbt
@ -124,9 +124,8 @@ val buildInfoSettings = Seq(
|
||||
val openapiScalaSettings = Seq(
|
||||
openapiScalaConfig := ScalaConfig()
|
||||
.withJson(ScalaJson.circeSemiauto)
|
||||
.addMapping(CustomMapping.forType({
|
||||
case TypeDef("LocalDateTime", _) =>
|
||||
TypeDef("Timestamp", Imports("docspell.common.Timestamp"))
|
||||
.addMapping(CustomMapping.forType({ case TypeDef("LocalDateTime", _) =>
|
||||
TypeDef("Timestamp", Imports("docspell.common.Timestamp"))
|
||||
}))
|
||||
.addMapping(CustomMapping.forFormatType({
|
||||
case "ident" =>
|
||||
@ -182,6 +181,8 @@ val openapiScalaSettings = Seq(
|
||||
)
|
||||
)
|
||||
)
|
||||
case "glob" =>
|
||||
field => field.copy(typeDef = TypeDef("Glob", Imports("docspell.common.Glob")))
|
||||
}))
|
||||
)
|
||||
|
||||
@ -595,11 +596,10 @@ def copyWebjarResources(
|
||||
src.flatMap { dir =>
|
||||
if (dir.isDirectory) {
|
||||
val files = (dir ** "*").filter(_.isFile).get.pair(Path.relativeTo(dir))
|
||||
files.flatMap {
|
||||
case (f, name) =>
|
||||
val target = targetDir / name
|
||||
IO.createDirectories(Seq(target.getParentFile))
|
||||
copyWithGZ(f, target)
|
||||
files.flatMap { case (f, name) =>
|
||||
val target = targetDir / name
|
||||
IO.createDirectories(Seq(target.getParentFile))
|
||||
copyWithGZ(f, target)
|
||||
}
|
||||
} else {
|
||||
val target = targetDir / dir.name
|
||||
@ -633,11 +633,13 @@ def compileElm(
|
||||
}
|
||||
|
||||
def createWebjarSource(wj: Seq[ModuleID], out: File): Seq[File] = {
|
||||
val target = out / "Webjars.scala"
|
||||
val target = out / "Webjars.scala"
|
||||
val badChars = "-.".toSet
|
||||
val fields = wj
|
||||
.map(m =>
|
||||
s"""val ${m.name.toLowerCase.filter(c => !badChars.contains(c))} = "/${m.name}/${m.revision}" """
|
||||
s"""val ${m.name.toLowerCase.filter(c =>
|
||||
!badChars.contains(c)
|
||||
)} = "/${m.name}/${m.revision}" """
|
||||
)
|
||||
.mkString("\n\n")
|
||||
val content = s"""package docspell.restserver.webapp
|
||||
|
Reference in New Issue
Block a user