Commits

Rob Lanphier committed 1a770cf

Adding v2 counterparts for existing v1 schemas

Comments (0)

Files changed (4)

jsonwidget/schema/v2/addressbookschema.json

+{
+    "optional": true, 
+    "title": "Address Book", 
+    "type": "array", 
+    "items": [
+        {
+            "optional": true, 
+            "title": "Address Book Entry", 
+            "type": "object", 
+            "properties": {
+                "firstName": {
+                    "optional": false, 
+                    "type": "string", 
+                    "title": "First Name"
+                }, 
+                "lastName": {
+                    "optional": false, 
+                    "type": "string", 
+                    "title": "Last Name"
+                }, 
+                "organizations": {
+                    "description": "A list of organizations with which this person is affiliated.", 
+                    "optional": true, 
+                    "title": "Affiliations", 
+                    "type": "array", 
+                    "items": [
+                        {
+                            "optional": false, 
+                            "title": "Organization", 
+                            "type": "object", 
+                            "properties": {
+                                "name": {
+                                    "optional": false, 
+                                    "type": "string", 
+                                    "title": "Organization Name"
+                                }, 
+                                "title": {
+                                    "optional": true, 
+                                    "type": "string", 
+                                    "title": "Title/Role"
+                                }, 
+                                "department": {
+                                    "optional": true, 
+                                    "type": "string", 
+                                    "title": "Department"
+                                }, 
+                                "type": {
+                                    "optional": true, 
+                                    "enum": [
+                                        "job", 
+                                        "school", 
+                                        "other"
+                                    ], 
+                                    "type": "string", 
+                                    "description": "What is the nature of this person's affiliation with the organization?", 
+                                    "title": "Type"
+                                }
+                            }, 
+                            "additionalProperties": false
+                        }
+                    ]
+                }, 
+                "addresses": {
+                    "optional": true, 
+                    "title": "Mailing/Street Addresses", 
+                    "type": "array", 
+                    "items": [
+                        {
+                            "optional": false, 
+                            "title": "Address", 
+                            "type": "object", 
+                            "properties": {
+                                "streetAddress": {
+                                    "optional": false, 
+                                    "type": "string", 
+                                    "title": "Street Address"
+                                }, 
+                                "locality": {
+                                    "optional": false, 
+                                    "type": "string", 
+                                    "title": "City (locality)"
+                                }, 
+                                "region": {
+                                    "optional": false, 
+                                    "type": "string", 
+                                    "title": "State/Provence/Region"
+                                }, 
+                                "postalCode": {
+                                    "optional": false, 
+                                    "type": "string", 
+                                    "description": "Post office code, such as zip code in the U.S.  If editing this data in JSON or YAML format directly, be sure to quote this as a string so that leading zeros aren't stripped.", 
+                                    "title": "Postal (Zip) Code"
+                                }, 
+                                "country": {
+                                    "optional": false, 
+                                    "type": "string", 
+                                    "title": "Country"
+                                }
+                            }, 
+                            "additionalProperties": false
+                        }
+                    ]
+                }, 
+                "phoneNumbers": {
+                    "optional": true, 
+                    "title": "Phone number(s)", 
+                    "type": "array", 
+                    "items": [
+                        {
+                            "optional": false, 
+                            "title": "Phone number", 
+                            "type": "object", 
+                            "properties": {
+                                "workhomeother": {
+                                    "enum": [
+                                        "Work", 
+                                        "Home", 
+                                        "Mobile", 
+                                        "Fax", 
+                                        "Other"
+                                    ], 
+                                    "description": "Is this number a work phone, home phone, etc?", 
+                                    "title": "Work/Home/Other", 
+                                    "type": "string", 
+                                    "optional": false
+                                }, 
+                                "Number": {
+                                    "optional": false, 
+                                    "type": "string"
+                                }, 
+                                "comment": {
+                                    "optional": true, 
+                                    "type": "string", 
+                                    "title": "Comment"
+                                }
+                            }, 
+                            "additionalProperties": false
+                        }
+                    ]
+                }, 
+                "emails": {
+                    "optional": true, 
+                    "title": "Email addresses", 
+                    "type": "array", 
+                    "items": [
+                        {
+                            "optional": false, 
+                            "title": "Email", 
+                            "type": "object", 
+                            "properties": {
+                                "type": {
+                                    "enum": [
+                                        "work", 
+                                        "home", 
+                                        "other"
+                                    ], 
+                                    "description": "Is this email address a work address, home address, etc?", 
+                                    "title": "Work/Home/Other", 
+                                    "type": "string", 
+                                    "optional": false
+                                }, 
+                                "value": {
+                                    "optional": false, 
+                                    "type": "string", 
+                                    "title": "Address"
+                                }, 
+                                "primary": {
+                                    "optional": false, 
+                                    "type": "boolean", 
+                                    "description": "Is this the primary email address for this person?", 
+                                    "title": "Primary?"
+                                }
+                            }, 
+                            "additionalProperties": false
+                        }
+                    ]
+                }, 
+                "ims": {
+                    "optional": true, 
+                    "title": "IM Accounts", 
+                    "type": "array", 
+                    "items": [
+                        {
+                            "optional": false, 
+                            "title": "Account", 
+                            "type": "object", 
+                            "properties": {
+                                "type": {
+                                    "enum": [
+                                        "aim", 
+                                        "gtalk", 
+                                        "icq", 
+                                        "xmpp", 
+                                        "msn", 
+                                        "skype", 
+                                        "qq", 
+                                        "yahoo"
+                                    ], 
+                                    "description": "What is the service provider/protocol associated with this instant messaging address?", 
+                                    "title": "Service", 
+                                    "optional": false, 
+                                    "desc_enum": {
+                                        "qq": "QQ (Tencent)", 
+                                        "gtalk": "GTalk (Google)", 
+                                        "xmpp": "XMPP/Jabber", 
+                                        "yahoo": "Yahoo!", 
+                                        "aim": "AIM (AOL)", 
+                                        "msn": "MSN (Microsoft)", 
+                                        "skype": "Skype", 
+                                        "icq": "ICQ"
+                                    }, 
+                                    "type": "string"
+                                }, 
+                                "value": {
+                                    "optional": false, 
+                                    "type": "string", 
+                                    "title": "Account ID"
+                                }
+                            }, 
+                            "additionalProperties": false
+                        }
+                    ]
+                }
+            }, 
+            "additionalProperties": false
+        }
+    ]
+}

jsonwidget/schema/v2/datatype-example-schema.json

+{
+    "desc": "Example with all datatypes in one place", 
+    "optional": true, 
+    "title": "Datatype example schema (datatype-example-schema.json)\n  Not terribly useful for anything other than demonstration purposes.  Edit one\n  of the existing schemas for your purpose, or generate one using the online\n  tool at http://robla.net/2005/jsonwidget\nData", 
+    "type": "array", 
+    "items": [
+        {
+            "optional": true, 
+            "title": "Item", 
+            "type": "object", 
+            "properties": {
+                "map_example": {
+                    "optional": true, 
+                    "title": "Map (map)", 
+                    "type": "object", 
+                    "properties": {
+                        "field1": {
+                            "optional": true, 
+                            "type": "string"
+                        }, 
+                        "field2": {
+                            "optional": true, 
+                            "type": "string"
+                        }
+                    }, 
+                    "additionalProperties": false
+                }, 
+                "seq_example": {
+                    "optional": true, 
+                    "title": "Sequence (seq)", 
+                    "type": "array", 
+                    "items": [
+                        {
+                            "optional": true, 
+                            "type": "string", 
+                            "title": "Item"
+                        }
+                    ]
+                }, 
+                "num_example": {
+                    "optional": true, 
+                    "type": "number", 
+                    "title": "Number (num)"
+                }, 
+                "int_example": {
+                    "optional": true, 
+                    "type": "integer", 
+                    "title": "Integer (int)"
+                }, 
+                "str_example": {
+                    "optional": true, 
+                    "type": "string", 
+                    "title": "String (str)"
+                }, 
+                "bool_example": {
+                    "optional": true, 
+                    "type": "boolean", 
+                    "title": "Boolean (bool)"
+                }, 
+                "str_enum_example": {
+                    "optional": true, 
+                    "enum": [
+                        "value1", 
+                        "value2", 
+                        "value3"
+                    ], 
+                    "type": "string", 
+                    "title": "String Enumeration (str + enum)"
+                }
+            }, 
+            "additionalProperties": false
+        }
+    ]
+}

jsonwidget/schema/v2/pasterschema.json

+{
+    "optional": true, 
+    "type": "object", 
+    "properties": {
+        "project_name": {
+            "optional": true, 
+            "type": "string", 
+            "title": "Project name"
+        }, 
+        "version": {
+            "optional": true, 
+            "type": "string", 
+            "title": "Version"
+        }, 
+        "description": {
+            "optional": true, 
+            "type": "string", 
+            "title": "Description (one liner)"
+        }, 
+        "long_description": {
+            "optional": true, 
+            "type": "string", 
+            "title": "Long description (multiline reStructuredText)"
+        }, 
+        "keywords": {
+            "optional": true, 
+            "type": "string", 
+            "title": "Keywords (space separated)"
+        }, 
+        "author": {
+            "optional": true, 
+            "type": "string", 
+            "title": "Author"
+        }, 
+        "author_email": {
+            "optional": true, 
+            "type": "string", 
+            "title": "Author email"
+        }, 
+        "url": {
+            "optional": true, 
+            "type": "string", 
+            "title": "URL to project page"
+        }, 
+        "license_name": {
+            "optional": true, 
+            "type": "string", 
+            "title": "License name"
+        }, 
+        "zip_safe": {
+            "optional": true, 
+            "type": "boolean", 
+            "title": "Zip safe?"
+        }
+    }, 
+    "additionalProperties": false
+}

jsonwidget/schema/v2/simpleaddr-schema.json

+{
+    "optional": true, 
+    "title": "Address Book Entry", 
+    "type": "object", 
+    "properties": {
+        "firstName": {
+            "optional": false, 
+            "type": "string", 
+            "title": "First Name"
+        }, 
+        "lastName": {
+            "optional": false, 
+            "type": "string", 
+            "title": "Last Name"
+        }, 
+        "streetAddress": {
+            "optional": false, 
+            "type": "string", 
+            "title": "Street Address"
+        }, 
+        "city": {
+            "optional": false, 
+            "type": "string", 
+            "title": "City"
+        }, 
+        "state": {
+            "optional": false, 
+            "type": "string", 
+            "title": "State"
+        }, 
+        "postalCode": {
+            "optional": false, 
+            "type": "string", 
+            "title": "Postal (Zip) Code"
+        }, 
+        "phoneNumbers": {
+            "optional": false, 
+            "title": "Phone numbers", 
+            "type": "array", 
+            "items": [
+                {
+                    "optional": false, 
+                    "type": "string", 
+                    "title": "Phone number"
+                }
+            ]
+        }
+    }, 
+    "additionalProperties": false
+}