Skip to content

Commit

Permalink
Merge pull request #77 from chrisala/1.2.4
Browse files Browse the repository at this point in the history
Added a schema generator for the document data type.
  • Loading branch information
chrisala committed Jun 16, 2015
2 parents f362cb2 + c5bf0a6 commit 2d3086c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/groovy/au/org/ala/ecodata/SchemaBuilder.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ class SchemaBuilder {
case 'boolean':
typeGenerator = this.&booleanProperty
break
case 'document':
typeGenerator = this.&documentProperty
break

default:
//typeGenerator = this.&error
Expand Down Expand Up @@ -281,6 +284,10 @@ class SchemaBuilder {
return [type:'boolean']
}

def documentProperty(property) {
return [type:'object', properties:[filename:[type:'string'], data:[type:'string', format:'base64']]]
}

def error(property) {
return [type:'unsupported']
}
Expand Down

0 comments on commit 2d3086c

Please sign in to comment.