js-yaml v4 functions are all safe

This commit is contained in:
Zachary Whaley 2021-07-20 19:48:38 -05:00
parent 58b549763c
commit b0ebdc0eaa

View File

@ -43,7 +43,7 @@ export class ApiInfoModel implements OpenAPIInfo {
if (IS_BROWSER && window.Blob && window.URL && window.URL.createObjectURL) {
let specString: string;
if (path.extname(this.options.downloadFileName) === '.yaml') {
specString = yaml.safeDump(this.parser.spec);
specString = yaml.dump(this.parser.spec);
} else {
specString = JSON.stringify(this.parser.spec, null, 2);
}