Skip to content

Commit a15617d

Browse files
Removed docs and code that used the old YAML object
1 parent 6edcf08 commit a15617d

File tree

9 files changed

+17
-96
lines changed

9 files changed

+17
-96
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,7 @@ node_modules
3838
# Test output
3939
/.nyc_output
4040
/coverage
41+
42+
# Jekyll output
43+
_site
44+
.sass-cache

docs/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ Classes & Methods
2828
- [`get()` method](refs.md#getref-options)
2929
- [`set()` method](refs.md#setref-value-options)
3030

31-
#### [The `YAML` object](yaml.md)
32-
- [`parse()` method](yaml.md#parsetext)
33-
- [`stringify()` method](yaml.md#stringifyvalue)
34-
3531
#### [The `Options` object](options.md)
3632

3733

docs/yaml.md

Lines changed: 0 additions & 84 deletions
This file was deleted.

online/js/bundle.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30699,6 +30699,7 @@ function toText (obj) {
3069930699
"use strict";
3070030700

3070130701
const SwaggerParser = require("../../../");
30702+
const jsYAML = require("js-yaml");
3070230703

3070330704
module.exports = form;
3070430705

@@ -30808,7 +30809,7 @@ form.getAPI = function () {
3080830809
else {
3080930810
let text = form.textBox.getValue();
3081030811
if (form.allow.yaml.is(":checked")) {
30811-
return SwaggerParser.YAML.parse(text);
30812+
return jsYAML.safeLoad(text);
3081230813
}
3081330814
else if (form.allow.json.is(":checked")) {
3081430815
return JSON.parse(text);
@@ -30819,7 +30820,7 @@ form.getAPI = function () {
3081930820
}
3082030821
};
3082130822

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

3082530826
const form = require("./form");

online/js/bundle.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

online/js/bundle.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

online/js/bundle.min.js.map

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

online/src/js/form.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use strict";
22

33
const SwaggerParser = require("../../../");
4+
const jsYAML = require("js-yaml");
45

56
module.exports = form;
67

@@ -110,7 +111,7 @@ form.getAPI = function () {
110111
else {
111112
let text = form.textBox.getValue();
112113
if (form.allow.yaml.is(":checked")) {
113-
return SwaggerParser.YAML.parse(text);
114+
return jsYAML.safeLoad(text);
114115
}
115116
else if (form.allow.json.is(":checked")) {
116117
return JSON.parse(text);

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"@types/node": "^14.0.23",
6161
"chai": "^4.2.0",
6262
"eslint": "^7.5.0",
63+
"js-yaml": "^3.14.0",
6364
"karma": "^5.1.0",
6465
"karma-cli": "^2.0.0",
6566
"mocha": "^8.0.1",

0 commit comments

Comments
 (0)