class Metadata(jsl.Document): class Options(object): definition_id = 'metadata' description = 'Metadata definition' additional_properties = True authors = jsl.ArrayField(jsl.EmailField(), min_items=1, unique_items=True, required=True) last_modified = jsl.DateTimeField(name='last-modified', required=True) version = jsl.StringField( required=True, pattern= r"^v?((0|([1-9][0-9]*))\.(0|([1-9][0-9]*))\.(0|([1-9][0-9]*)))((-([0-9A-Za-z\-]+))(\.([0-9A-Za-z\-]+))*((\+([0-9A-Za-z\-]+))(\.([0-9A-Za-z\-]+))*)?)?$" ) comment = jsl.StringField(required=False, max_length=1024)
class Notifications(jsl.Document): email_addresses = jsl.ArrayField(jsl.EmailField(), required=True) irc = jsl.ArrayField(jsl.StringField())
class User(Document): email = jsl.EmailField(required=true_if_creator) password = jsl.StringField(required=true_if_creator)