[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [cmis-browser] JSON Schema
Any thoughts about WADL? http://en.wikipedia.org/wiki/Web_Application_Description_Language (Did not use any of them, but seems to be another option) Jens -----Original Message----- From: Florian Müller [mailto:florian.mueller@alfresco.com] Sent: Donnerstag, 7. Oktober 2010 13:09 To: cmis-browser@lists.oasis-open.org Subject: [cmis-browser] JSON Schema Hi, When you look for "JSON Schema", you eventually end up here: http://json-schema.org/ Unfortunately, it is very verbose, hard to read and lacks a few things we need for the browser binding (see below). There is a more lightweight alternative called Orderly: http://orderly-json.org/ Orderly is a subset of JSON Schema which is actually readable and (I think) usable for a specification. Since it is a subset of JSON Schema, it also lacks a few things that we need for our purpose: - It only uses the JSON data types. That's not surprising since it is a general purpose description. But I think we need the CMIS data types in the specification. We should be able to express if we mean a string, an id, a URI, or a HTML fragment, regardless of that they are all mapped to a JSON string on the wire. - There is no way to describe a map like structure. We need that at least for the properties. So I played with Orderly a bit, assumed that the CMIS data types were available and introduced the missing map concept (see below). I followed the CMIS XML schema and not the current browser binding draft. I'm not proposing that, it was just an exercise to learn Orderly. WDYT? Regards, Florian Object: http://docs.oasis-open.org/ns/cmis/browser/200908/object object { ref "http://docs.oasis-open.org/ns/cmis/browser/200908/properties" properties; ref "http://docs.oasis-open.org/ns/cmis/browser/200908/allowableActions" allowableActions?; array { ref "http://docs.oasis-open.org/ns/cmis/browser/200908/object" } relationships?; ref "http://docs.oasis-open.org/ns/cmis/browser/200908/changeEvent" changeEvent?; ref "http://docs.oasis-open.org/ns/cmis/browser/200908/acl" acl?; array { ref "http://docs.oasis-open.org/ns/cmis/browser/200908/rendition" } renditions?; array { ref "http://docs.oasis-open.org/ns/cmis/browser/200908/policyId" } policyIds?; }*; Properties: http://docs.oasis-open.org/ns/cmis/browser/200908/properties map { id, union { id; string; boolean; decimal; integer; datetime; uri; html; array { id }; array { string }; array { boolean }; array { decimal }; array { integer }; array { datetime }; array { uri }; array { html }; null; } }; AllowableActions: http://docs.oasis-open.org/ns/cmis/browser/200908/allowableActions object { boolean canCreateDocument?; ...todo... }*; ChangeEvent: http://docs.oasis-open.org/ns/cmis/browser/200908/changeEvent object { ...todo... }*; ACL: http://docs.oasis-open.org/ns/cmis/browser/200908/acl object { array { ref "http://docs.oasis-open.org/ns/cmis/browser/200908/ace" } aces; boolean isExact?; }*; ACE: http://docs.oasis-open.org/ns/cmis/browser/200908/ace object { object { string principalId; }* principal; array { string } permissions; boolean isDirect; }*; Renditions: http://docs.oasis-open.org/ns/cmis/browser/200908/rendition object { string streamId; string mimeType; integer length; string kind; string title; integer height?; integer width?; string renditionDocumentId; }*; Policy Ids: http://docs.oasis-open.org/ns/cmis/browser/200908/policyId object { array { string } ids; }*; Object in folder: http://docs.oasis-open.org/ns/cmis/browser/200908/objectInFolder object { ref "http://docs.oasis-open.org/ns/cmis/browser/200908/object" object; string pathSegment; }*; Folder list: http://docs.oasis-open.org/ns/cmis/browser/200908/objectInFolderList object { array { ref "http://docs.oasis-open.org/ns/cmis/browser/200908/objectInFolder" } objects; boolean hasMoreItems?; integer numItems?; }*; Type Definition: http://docs.oasis-open.org/ns/cmis/browser/200908/typeDefinition object { string id; string localName; string localNamespace; string displayName; string queryName; string description; string [ "cmis:document", "cmis:folder", "cmis:relationship", "cmis:policy" ] baseTypeId; string parentTypeId?; boolean creatable; boolean fileable; boolean queryable; boolean fulltextIndexed; boolean includedInSupertypeQuery; boolean controllablePolicy; boolean controllableAcl; array { ref "http://docs.oasis-open.org/ns/cmis/browser/200908/propertyDefinition" } propertyDefinitions; }*; --------------------------------------------------------------------- To unsubscribe from this mail list, you must leave the OASIS TC that generates this mail. Follow this link to all your TCs in OASIS at: https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]