Merge "Add JSONSchemas"

This commit is contained in:
Jenkins 2012-11-18 03:33:54 +00:00 committed by Gerrit Code Review
commit fd06cdfad0
4 changed files with 152 additions and 0 deletions
monikerclient/resources/schemas/v1
tools

@ -0,0 +1,52 @@
{
"id": "/schemas/domain",
"$schema": "http://json-schema.org/draft-03/hyper-schema",
"title": "domain",
"description": "Domain",
"properties": {
"id": {
"type": "string",
"description": "Domain Identifier",
"pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$",
"readonly": true
},
"name": {
"type": "string",
"description": "Domain name",
"maxLength": 255,
"pattern": "^.+[^\\.]$",
"required": true
},
"email": {
"type": "string",
"description": "Hostmaster email address",
"format": "email",
"maxLength": 255,
"required": true
},
"ttl": {
"type": "integer",
"description": "Time to live"
},
"serial": {
"type": "integer",
"description": "Serial Number",
"readonly": true
},
"created_at": {
"type": "string",
"description": "Date and time of image registration",
"format": "date-time",
"readonly": true
},
"updated_at": {
"type": "string",
"description": "Date and time of image registration",
"format": "date-time",
"readonly": true
}
}
}

@ -0,0 +1,52 @@
{
"id": "/schemas/record",
"$schema": "http://json-schema.org/draft-03/hyper-schema",
"title": "record",
"description": "Record",
"properties": {
"id": {
"type": "string",
"description": "Record Identifier",
"pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$",
"readonly": true
},
"name": {
"type": "string",
"description": "DNS Record Name",
"maxLength": 255,
"pattern": "^.+[^\\.]$",
"required": true
},
"type": {
"type": "string",
"description": "DNS Record Type",
"enum": ["A", "AAAA", "CNAME", "MX", "SRV", "TXT", "SPF", "NS"]
},
"data": {
"type": "string",
"description": "DNS Record Value",
"maxLength": 255,
"required": true
},
"ttl": {
"type": "integer",
"description": "Time to live",
"min": 60
},
"created_at": {
"type": "string",
"description": "Date and time of image registration",
"format": "date-time",
"readonly": true
},
"updated_at": {
"type": "string",
"description": "Date and time of image registration",
"format": "date-time",
"readonly": true
}
}
}

@ -0,0 +1,47 @@
{
"id": "/schemas/server",
"$schema": "http://json-schema.org/draft-03/hyper-schema",
"title": "server",
"description": "Server",
"properties": {
"id": {
"type": "string",
"description": "Server Identifier",
"pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$",
"readonly": true
},
"name": {
"type": "string",
"description": "Server DNS name",
"maxLength": 255,
"pattern": "^.+[^\\.]$",
"required": true
},
"ipv4": {
"type": "string",
"description": "IPv4 address of server",
"format": "ip-address",
"required": true
},
"ipv6": {
"type": "string",
"description": "IPv6 address of server",
"format": "ipv6"
},
"created_at": {
"type": "string",
"description": "Date and time of server creation",
"format": "date-time",
"readonly": true
},
"updated_at": {
"type": "string",
"description": "Date and time of last server update",
"format": "date-time",
"readonly": true
}
}
}

@ -1 +1,2 @@
cliff
jsonschema>=0.7