Skip to content

Commit

Permalink
Removed docs and code that used the old YAML object
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesMessinger committed Jul 22, 2020
1 parent 6edcf08 commit a15617d
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 96 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ node_modules
# Test output
/.nyc_output
/coverage

# Jekyll output
_site
.sass-cache
4 changes: 0 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ Classes & Methods
- [`get()` method](refs.md#getref-options)
- [`set()` method](refs.md#setref-value-options)

#### [The `YAML` object](yaml.md)
- [`parse()` method](yaml.md#parsetext)
- [`stringify()` method](yaml.md#stringifyvalue)

#### [The `Options` object](options.md)


Expand Down
84 changes: 0 additions & 84 deletions docs/yaml.md

This file was deleted.

5 changes: 3 additions & 2 deletions online/js/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -30699,6 +30699,7 @@ function toText (obj) {
"use strict";

const SwaggerParser = require("../../../");
const jsYAML = require("js-yaml");

module.exports = form;

Expand Down Expand Up @@ -30808,7 +30809,7 @@ form.getAPI = function () {
else {
let text = form.textBox.getValue();
if (form.allow.yaml.is(":checked")) {
return SwaggerParser.YAML.parse(text);
return jsYAML.safeLoad(text);
}
else if (form.allow.json.is(":checked")) {
return JSON.parse(text);
Expand All @@ -30819,7 +30820,7 @@ form.getAPI = function () {
}
};

},{"../../../":1}],212:[function(require,module,exports){
},{"../../../":1,"js-yaml":72}],212:[function(require,module,exports){
"use strict";

const form = require("./form");
Expand Down
4 changes: 2 additions & 2 deletions online/js/bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion online/js/bundle.min.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions online/js/bundle.min.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion online/src/js/form.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use strict";

const SwaggerParser = require("../../../");
const jsYAML = require("js-yaml");

module.exports = form;

Expand Down Expand Up @@ -110,7 +111,7 @@ form.getAPI = function () {
else {
let text = form.textBox.getValue();
if (form.allow.yaml.is(":checked")) {
return SwaggerParser.YAML.parse(text);
return jsYAML.safeLoad(text);
}
else if (form.allow.json.is(":checked")) {
return JSON.parse(text);
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"@types/node": "^14.0.23",
"chai": "^4.2.0",
"eslint": "^7.5.0",
"js-yaml": "^3.14.0",
"karma": "^5.1.0",
"karma-cli": "^2.0.0",
"mocha": "^8.0.1",
Expand Down

0 comments on commit a15617d

Please sign in to comment.