-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make configured filemetadata fields visible on UI
- Loading branch information
Showing
8 changed files
with
91 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
common-lib/src/main/scala/com/gu/mediaservice/lib/config/FileMetadataConfig.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.gu.mediaservice.lib.config | ||
|
||
import play.api.libs.functional.syntax._ | ||
|
||
case class FileMetadataConfig( | ||
directory: String, | ||
tag: String, | ||
visible: Boolean = false, | ||
searchable: Boolean = false, | ||
alias: Option[String]) | ||
|
||
object FileMetadataConfig { | ||
import play.api.libs.json._ | ||
implicit val MetadataConfigurationWrites: Writes[FileMetadataConfig] = ( | ||
(__ \ "directory").write[String] ~ | ||
(__ \ "tag").write[String] ~ | ||
(__ \ "visible").write[Boolean] ~ | ||
(__ \ "searchable").write[Boolean] ~ | ||
(__ \ "alias").writeNullable[String] | ||
)(unlift(FileMetadataConfig.unapply)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters