diff options
Diffstat (limited to 'js/dojo/dojox/app/schema')
| -rw-r--r-- | js/dojo/dojox/app/schema/README | 1 | ||||
| -rw-r--r-- | js/dojo/dojox/app/schema/application.json | 55 | ||||
| -rw-r--r-- | js/dojo/dojox/app/schema/model.json | 11 | ||||
| -rw-r--r-- | js/dojo/dojox/app/schema/scene.json | 29 | ||||
| -rw-r--r-- | js/dojo/dojox/app/schema/store.json | 11 | ||||
| -rw-r--r-- | js/dojo/dojox/app/schema/view.json | 30 |
6 files changed, 137 insertions, 0 deletions
diff --git a/js/dojo/dojox/app/schema/README b/js/dojo/dojox/app/schema/README new file mode 100644 index 0000000..7e514bb --- /dev/null +++ b/js/dojo/dojox/app/schema/README @@ -0,0 +1 @@ +Schemas to validate application configs, not fully in sync with what is being accepted just yet diff --git a/js/dojo/dojox/app/schema/application.json b/js/dojo/dojox/app/schema/application.json new file mode 100644 index 0000000..7f8fdd4 --- /dev/null +++ b/js/dojo/dojox/app/schema/application.json @@ -0,0 +1,55 @@ +define({ + "description":"A representation of an Application", + "type": "object", + "properties":{ + "author": {"$ref": "http://json-schema.org/card"}, + + "description": { + "description": "Description of the application represented here", + "type": "string" + }, + + "modules": { + "type": "array", + "description": "Modules this application requires ", + "default": [], + "items":{ + "type": "string", + "description": "Module to be loaded and mixed into the application" + } + }, + + + "defaultScene": { + "type": "string" + "description": "id of scene to load for this application at startup" + }, + + "scenes": { + "type": "object", + "description": "This object contains references to scene objects, which are collections of views and models making up a closely related set of the ui", + "additionalProperties":{"$ref":"/jdoe/test/schema/scene.json"} + }, + + "stores": { + "type": "object", + "description":"This object contains references to store instances that the rest of the application will use.", + "additionalProperties": {"$ref":"/jdoe/test/schema/scene.json"}, + "default": {} + }, + + "models": { + "type": "object", + "description": "This object contains references to model instances the application uses", + "additionalProperties":{"$ref":"/jdoe/test/schema/model.json"}, + "default": {} + }, + + "views": { + "type": "object", + "description": "This object contains references to view instances the application uses", + "additionalProperties":{"$ref":"/jdoe/test/schema/view.json"}, + "default": {} + } + } +}); diff --git a/js/dojo/dojox/app/schema/model.json b/js/dojo/dojox/app/schema/model.json new file mode 100644 index 0000000..a630516 --- /dev/null +++ b/js/dojo/dojox/app/schema/model.json @@ -0,0 +1,11 @@ +{ + "description":"An applications model declaration", + "type": "object", + "properties":{ + "type": { + "type": "string", + "description": "Model Instance Type (Class)" + }, + }, + "additionalProperties": true +} diff --git a/js/dojo/dojox/app/schema/scene.json b/js/dojo/dojox/app/schema/scene.json new file mode 100644 index 0000000..412ce90 --- /dev/null +++ b/js/dojo/dojox/app/schema/scene.json @@ -0,0 +1,29 @@ +{ + "description":"An application's scene instance declarations", + "type": "object", + "properties":{ + "type": { + "type": "string", + "description": "Scene Instance Type (Class)" + }, + "models": { + "type": "array", + "items": {"$ref": "/jdoe/test/schema/model"} + }, + "views": { + "type": "array", + "items": { + "type": "object", + "properties" : { + "id": { + "type": "string" + }, + "view": "$ref": "/jdoe/test/schema/view", + "params": { + "type": "object" + } + } + } + }, + "additionalProperties": true +} diff --git a/js/dojo/dojox/app/schema/store.json b/js/dojo/dojox/app/schema/store.json new file mode 100644 index 0000000..924f5e1 --- /dev/null +++ b/js/dojo/dojox/app/schema/store.json @@ -0,0 +1,11 @@ +{ + "description":"An applications store instance declarations", + "type": "object", + "properties":{ + "type": { + "type": "string", + "description": "Store Instance Type (Class)" + }, + }, + "additionalProperties": true +} diff --git a/js/dojo/dojox/app/schema/view.json b/js/dojo/dojox/app/schema/view.json new file mode 100644 index 0000000..b6c1c54 --- /dev/null +++ b/js/dojo/dojox/app/schema/view.json @@ -0,0 +1,30 @@ +{ + "description": "Base View Schema for defining View Instances in an application", + "type": "object", + "properties": { + "type": { + "type":"string", + "description": "The Name of the Class to be used for this view" + }, + + "models": { + "type": "array", + "items": { + "type":"string", + "description": "Models that this view requires. These should reference one of the available #models", + "dependences":{} + } + }, + + "persist": { + "type": "boolean", + "description":"Keep this view loaded on the dom or memory, but not necessarily visible" + }, + + "template": { + "type": "string", + "description": "Template to be used with this view" + } + } +} + |
