Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #521 from mulesoft/new-version
Browse files Browse the repository at this point in the history
New version
  • Loading branch information
carowright authored Jul 20, 2018
2 parents 9693935 + 740ff2c commit 242e39c
Show file tree
Hide file tree
Showing 7 changed files with 366 additions and 244 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"angular": "~1.3.17",
"angular-bootstrap": ">=0.11.0 <0.14.0",
"angular-ui-tree": "2.1.5",
"api-console": "mulesoft/api-console#v3.0.29",
"api-console": "mulesoft/api-console#v3.0.30",
"es5-shim": "~2.3.0",
"file-saver.js": "~1.20150304.1",
"font-awesome": "~4.0.3",
Expand Down
116 changes: 59 additions & 57 deletions dist/scripts/api-designer-parser.js

Large diffs are not rendered by default.

105 changes: 52 additions & 53 deletions dist/scripts/api-designer-parser.min.js

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion dist/scripts/api-designer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1699,7 +1699,11 @@
if (astNode && astNode.root() && astNode.root() === astNode) {
var lastChild = findLastChild(astNode);
if (lastChild && lastChild.lowLevel() && lastChild.lowLevel().end() <= offset) {
astNode = lastChild;
var nodeOff = positionOffset(text, lastChild.lowLevel().start());
var posOff = positionOffset(text, offset);
if (nodeOff <= posOff) {
astNode = lastChild;
}
}
}
if (!allowNull && !astNode) {
Expand Down Expand Up @@ -3095,6 +3099,14 @@
return new ResolvedProvider(resolver);
}
exports.getContentProvider = getContentProvider;
function positionOffset(text, pos) {
var lineStart = text.lastIndexOf('\n', pos);
lineStart = Math.max(0, lineStart);
var str = text.substring(lineStart, pos);
var strTrim = str.trim();
var result = str.indexOf(strTrim);
return result;
}
},
{
'../resources/categories.json': 12,
Expand Down Expand Up @@ -36385,17 +36397,22 @@
}
if (oasDef.hasOwnProperty('properties')) {
var modelProps = [];
var required = [];
_.entries(oasDef.properties).map(function (_ref) {
var _ref2 = _slicedToArray(_ref, 2), key = _ref2[0], value = _ref2[1];
if (value) {
var prop = _this3._import(value);
prop.name = key;
if (!value.hasOwnProperty('required') || value.required)
required.push(prop.name);
modelProps.push(prop);
}
});
model.properties = modelProps;
if (oasDef.hasOwnProperty('required') && _.isArray(oasDef.required)) {
model.propsRequired = oasDef.required;
} else {
model.propsRequired = required;
}
}
if (oasDef.hasOwnProperty('allOf')) {
Expand Down
34 changes: 17 additions & 17 deletions dist/scripts/api-designer.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 242e39c

Please sign in to comment.