Skip to content

Instantly share code, notes, and snippets.

@luan-cestari
Created February 11, 2015 20:03
Show Gist options
  • Save luan-cestari/a0ee0b58e9a08467d9a2 to your computer and use it in GitHub Desktop.
Save luan-cestari/a0ee0b58e9a08467d9a2 to your computer and use it in GitHub Desktop.
{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"object",
"description":"JSON schema for entity 'user' version '1.0.0'",
"properties":{
"enumTest":{
"type":"string",
"constraints":{
"enum":"site_type_enum"
}
},
"personalInfo":{
"type":"object",
"properties":{
"lastName":{
"type":"string"
},
"emailConfirmed":{
"type":"boolean"
},
"timezone":{
"type":"string"
},
"greeting":{
"type":"string"
},
"suffix":{
"type":"string"
},
"title":{
"type":"string"
},
"locale":{
"type":"string"
},
"firstName":{
"type":"string"
},
"phoneNumber":{
"type":"string",
"pattern":"^\\d{3}\\-\\d{4}\\ \\d{4}$"
},
"faxNumber":{
"type":"string"
},
"company":{
"type":"string"
},
"nonrequid":{
"type":"string"
},
"department":{
"type":"string"
},
"email":{
"type":"string"
},
"requid":{
"type":"string"
}
},
"required":[
"nonrequid",
"requid"
]
},
"iduid":{
"type":"string"
},
"active":{
"type":"boolean"
},
"updatedDate":{
"type":"date"
},
"login":{
"type":"string",
"constraints":{
"minLength":"1",
"maxLength":"64"
}
},
"objectType":{
"type":"string"
},
"uid":{
"type":"string"
},
"password":{
"type":"object",
"properties":{
"salt":{
"type":"string"
},
"hashed":{
"type":"string"
}
}
},
"createdDate":{
"type":"date"
},
"_id":{
"type":"string"
},
"nonrequid":{
"type":"string"
},
"requid":{
"type":"string",
"description":"test"
},
"contactPermissions":{
"type":"object",
"properties":{
"allowEmailContact":{
"type":"boolean"
},
"allowThirdPartyContact":{
"type":"boolean"
},
"allowPhoneContact":{
"type":"boolean"
},
"allowMailContact":{
"type":"boolean"
},
"allowFaxContact":{
"type":"boolean"
}
},
"required":[
"allowEmailContact"
]
},
"required":[
"iduid",
"login",
"_id",
"nonrequid",
"requid"
]
},
"enums":[
{
"name":"site_type_enum",
"values":[
"marketing",
"shipping",
"service",
"billing"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment