Skip to content

Commit

Permalink
Schema DDL: add uuid format (close #305)
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhanunlu authored and chuwy committed Dec 19, 2017
1 parent d8b859b commit 3a19f4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ object StringProperties {
case object DateTimeFormat extends Format { val asString = "date-time" }
case object DateFormat extends Format { val asString = "date" }
case object HostNameFormat extends Format { val asString = "hostname" }
case object UuidFormat extends Format { val asString = "uuid" }

/**
* Implementations MAY add custom format attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ object StringSerializers {
case JString(format) if format == "hostname" => HostNameFormat
case JString(format) if format == "date-time" => DateTimeFormat
case JString(format) if format == "date" => DateFormat
case JString(format) if format == "uuid" => UuidFormat
case JString(format) => CustomFormat(format)
case x => throw new MappingException("Format must be string")
},
Expand Down

0 comments on commit 3a19f4d

Please sign in to comment.