Changeset 506 for Dev/trunk/src/server
- Timestamp:
- 03/11/14 22:45:58 (11 years ago)
- Location:
- Dev/trunk/src/server
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/server/config/couchdb-design-docs.js
r501 r506 11 11 12 12 "qed/schemaInfo": { 13 version: " 2"13 version: "3" 14 14 }, 15 15 -
Dev/trunk/src/server/config/couchdb-schema.json
r499 r506 2 2 "$schema": "http://json-schema.org/draft-04/schema#", 3 3 "title": "QED Object Schema", 4 "version": " 2",4 "version": "3", 5 5 "type": "object", 6 6 "oneOf": [ … … 9 9 ], 10 10 "definitions": { 11 "nonEmptyString": { "type": "string", "minLength": 1 }, 11 12 "schemaInfo": { 12 13 "type": "object", 13 14 "properties": { 14 15 "_id": { "type": "string", "pattern": "^schemaInfo$" }, 15 "_rev": { " type": "string" },16 "version": { " type": "string" }16 "_rev": { "$ref": "#/definitions/nonEmptyString" }, 17 "version": { "$ref": "#/definitions/nonEmptyString" } 17 18 }, 18 19 "required": ["_id","version"], … … 33 34 "properties": { 34 35 "type": { "type": "string", "pattern": "^Question$" }, 35 "_id": { " type": "string" },36 "_rev": { " type": "string" },37 "categories": { "type": "array", "items": { " type": "string" } },38 "code": { " type": "string", "minLength": 1},36 "_id": { "$ref": "#/definitions/nonEmptyString" }, 37 "_rev": { "$ref": "#/definitions/nonEmptyString" }, 38 "categories": { "type": "array", "items": { "$ref": "#/definitions/nonEmptyString" } }, 39 "code": { "$ref": "#/definitions/nonEmptyString" }, 39 40 "content": { "type": "array", "items": { "$ref": "#/definitions/content/any" } }, 40 "description": { " type": "string" },41 "description": { "$ref": "#/definitions/nonEmptyString" }, 41 42 "publicationDate": { "type": "string", "format": "datetime" }, 42 "title": { " type": "string" },43 "topic": { " type": "string" }43 "title": { "$ref": "#/definitions/nonEmptyString" }, 44 "topic": { "$ref": "#/definitions/nonEmptyString" } 44 45 }, 45 46 "required": ["type","categories","code","content","title"], … … 50 51 "properties": { 51 52 "type": { "type": "string", "pattern": "^Survey$" }, 52 "_id": { " type": "string" },53 "_rev": { " type": "string" },54 "description": { " type": "string" },53 "_id": { "$ref": "#/definitions/nonEmptyString" }, 54 "_rev": { "$ref": "#/definitions/nonEmptyString" }, 55 "description": { "$ref": "#/definitions/nonEmptyString" }, 55 56 "publicationDate": { "type": "string", "format": "datetime" }, 56 57 "questions": { "type": "array", "items": { "$ref": "#/definitions/docs/Question" } }, 57 "title": { " type": "string" }58 "title": { "$ref": "#/definitions/nonEmptyString" } 58 59 }, 59 60 "required": ["type","questions","title"], … … 64 65 "properties": { 65 66 "type": { "type": "string", "pattern": "^SurveyRun$" }, 66 "_id": { " type": "string" },67 "_rev": { " type": "string" },68 "description": { " type": "string" },67 "_id": { "$ref": "#/definitions/nonEmptyString" }, 68 "_rev": { "$ref": "#/definitions/nonEmptyString" }, 69 "description": { "$ref": "#/definitions/nonEmptyString" }, 69 70 "endDate": { "type": "string", "format": "datetime" }, 70 "liveName": { " type": "string" },71 "liveName": { "$ref": "#/definitions/nonEmptyString" }, 71 72 "mode": { "type": "string", "enum": [ "open", "closed" ] }, 72 73 "respondentCanDeleteOwnResponse": { "type": "boolean" }, 73 "secret": { " type": "string", "minLength": 1},74 "secret": { "$ref": "#/definitions/nonEmptyString" }, 74 75 "startDate": { "type": "string", "format": "datetime" }, 75 76 "survey": { "$ref": "#/definitions/docs/Survey" }, 76 "title": { " type": "string" }77 }, 78 "required": ["type"," description","mode","secret","survey","title"],77 "title": { "$ref": "#/definitions/nonEmptyString" } 78 }, 79 "required": ["type","mode","secret","survey","title"], 79 80 "additionalProperties": false 80 81 }, … … 83 84 "properties": { 84 85 "type": { "type": "string", "pattern": "^Response$" }, 85 "_id": { " type": "string" },86 "_rev": { " type": "string" },86 "_id": { "$ref": "#/definitions/nonEmptyString" }, 87 "_rev": { "$ref": "#/definitions/nonEmptyString" }, 87 88 "answers": { "type": "object" }, 88 89 "email": { "type": "string", "format": "email" }, 89 90 "publicationDate": { "type": "string", "format": "datetime" }, 90 "secret": { " type": "string", "minLength": 1},91 "surveyRunId": { " type": "string" }91 "secret": { "$ref": "#/definitions/nonEmptyString" }, 92 "surveyRunId": { "$ref": "#/definitions/nonEmptyString" } 92 93 }, 93 94 "required": ["type","answers","secret","surveyRunId"], … … 95 96 } 96 97 }, 97 "content": {98 "content": { 98 99 "any": { 99 100 "type": "object", … … 113 114 "properties": { 114 115 "type": { "type": "string", "pattern": "^Header$" }, 115 "text": { " type": "string" }116 "text": { "$ref": "#/definitions/nonEmptyString" } 116 117 }, 117 118 "required": ["type","text"], … … 122 123 "properties": { 123 124 "type": { "type": "string", "pattern": "^Text$" }, 124 "text": { " type": "string" }125 "text": { "$ref": "#/definitions/nonEmptyString" } 125 126 }, 126 127 "required": ["type","text"], … … 138 139 "properties": { 139 140 "type": { "type": "string", "pattern": "^StringInput$" }, 140 "text": { "type": "string" } 141 }, 142 "required":["type","text"], 141 "subcode": { "$ref": "#/definitions/nonEmptyString" }, 142 "text": { "$ref": "#/definitions/nonEmptyString" } 143 }, 144 "required":["type","subcode"], 143 145 "additionalProperties": false 144 146 }, … … 148 150 "type": { "type": "string", "pattern": "^TextInput$" }, 149 151 "maxLength": { "type": "integer" }, 150 "text": { "type": "string" } 151 }, 152 "required":["type","text"], 152 "subcode": { "$ref": "#/definitions/nonEmptyString" }, 153 "text": { "$ref": "#/definitions/nonEmptyString" } 154 }, 155 "required":["type","subcode"], 153 156 "additionalProperties": false 154 157 }, … … 160 163 "max": { "type": "integer" }, 161 164 "places": { "type": "integer" }, 162 "text": { "type": "string" } 163 }, 164 "required":["type","text"], 165 "subcode": { "$ref": "#/definitions/nonEmptyString" }, 166 "text": { "$ref": "#/definitions/nonEmptyString" } 167 }, 168 "required":["type","subcode"], 165 169 "additionalProperties": false 166 170 }, … … 169 173 "properties": { 170 174 "type": { "type": "string", "pattern": "^ScaleInput$" }, 171 "minLabel": { " type": "string" },175 "minLabel": { "$ref": "#/definitions/nonEmptyString" }, 172 176 "min": { "type": "integer" }, 173 177 "max": { "type": "integer" }, 174 "maxLabel": { " type": "string" },175 "naLabel": { " type": "string" },178 "maxLabel": { "$ref": "#/definitions/nonEmptyString" }, 179 "naLabel": { "$ref": "#/definitions/nonEmptyString" }, 176 180 "items": { "type": "array", "items": { 177 181 "type": "object", 178 182 "properties": { 179 "text": { "type": "string" }, 180 "minLabel": { "type": "string" }, 181 "maxLabel": { "type": "string" } 183 "minLabel": { "$ref": "#/definitions/nonEmptyString" }, 184 "maxLabel": { "$ref": "#/definitions/nonEmptyString" }, 185 "subcode": { "$ref": "#/definitions/nonEmptyString" }, 186 "text": { "$ref": "#/definitions/nonEmptyString" } 182 187 }, 183 "required":[" text"],188 "required":["subcode","text"], 184 189 "additionalProperties": false 185 190 } } … … 196 201 "type": "object", 197 202 "properties": { 198 "text": { "type": "string" } 203 "subcode": { "$ref": "#/definitions/nonEmptyString" }, 204 "text": { "$ref": "#/definitions/nonEmptyString" } 199 205 }, 200 "required": [" text"],206 "required": ["subcode","text"], 201 207 "additionalProperties": false 202 } } 208 } }, 209 "otherItem": { 210 "type": "object", 211 "properties": { 212 "subcode": { "$ref": "#/definitions/nonEmptyString" }, 213 "text": { "$ref": "#/definitions/nonEmptyString" } 214 }, 215 "required": ["subcode","text"], 216 "additionalProperties": false 217 } 203 218 }, 204 219 "required":["type","items"],
Note: See TracChangeset
for help on using the changeset viewer.