Commit 47be5070 authored by Boris Kocherov's avatar Boris Kocherov

add 1_clean_document.json and xmla_settings_schema.json in demo

parent 424b799e
[ [
"docs/demo.json" "docs/1_clean_document.json",
"docs/demo.json",
"docs/xmla_settings_schema.json"
] ]
{}
\ No newline at end of file
{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "Settings for XMLA connection",
"properties": {
"url": {
"uniqueItems": true,
"items": {
"format": "uri",
"minLength": 1,
"type": "string"
},
"minItems": 1,
"type": "array"
},
"username": {
"type": "string"
},
"password": {
"type": "string"
}
},
"required": [
"url"
],
"additionalProperties": false
}
\ No newline at end of file
...@@ -50,11 +50,6 @@ ...@@ -50,11 +50,6 @@
rJS(window) rJS(window)
.ready(function (g) { .ready(function (g) {
g.props = {}; g.props = {};
g.props.schemas = [
"http://json-schema.org/draft-07/schema",
"http://json-schema.org/draft-06/schema",
"http://json-schema.org/draft-04/schema"
];
return RSVP.Queue() return RSVP.Queue()
.push(function () { .push(function () {
return RSVP.all([ return RSVP.all([
...@@ -63,9 +58,20 @@ ...@@ -63,9 +58,20 @@
]); ]);
}) })
.push(function (arr) { .push(function (arr) {
g.props.schemas = g.props.schemas.concat(arr[0]); var schemas = arr[0],
docs = arr[1];
g.props.schemas = docs.filter(function (v) {
var suffix = "_schema.json";
return v.indexOf(suffix, v.length - suffix.length) !== -1;
});
g.props.schemas = g.props.schemas.concat([
"http://json-schema.org/draft-07/schema",
"http://json-schema.org/draft-06/schema",
"http://json-schema.org/draft-04/schema"
]);
g.props.schemas = g.props.schemas.concat(schemas);
g.props.schemas = ["form generated by schema"].concat(g.props.schemas); g.props.schemas = ["form generated by schema"].concat(g.props.schemas);
g.props.documents = arr[1].concat(arr[0]); g.props.documents = docs.concat(schemas);
g.props.documents = ["open document"].concat(g.props.documents); g.props.documents = ["open document"].concat(g.props.documents);
}) })
.push(function () { .push(function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment