diff --git a/monikerclient/resources/schemas/v1/domain.json b/monikerclient/resources/schemas/v1/domain.json new file mode 100644 index 0000000..d41646f --- /dev/null +++ b/monikerclient/resources/schemas/v1/domain.json @@ -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 + } + } +} diff --git a/monikerclient/resources/schemas/v1/record.json b/monikerclient/resources/schemas/v1/record.json new file mode 100644 index 0000000..a6b3391 --- /dev/null +++ b/monikerclient/resources/schemas/v1/record.json @@ -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 + } + } +} diff --git a/monikerclient/resources/schemas/v1/server.json b/monikerclient/resources/schemas/v1/server.json new file mode 100644 index 0000000..92470fb --- /dev/null +++ b/monikerclient/resources/schemas/v1/server.json @@ -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 + } + } +} diff --git a/tools/pip-requires b/tools/pip-requires index 1810bb7..877b639 100644 --- a/tools/pip-requires +++ b/tools/pip-requires @@ -1 +1,2 @@ cliff +jsonschema>=0.7