mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-07 04:21:11 +00:00
feat: upgrade js-yaml package (#403)
* feat: upgraded js-yaml package from v.3 to v.4 with YAML 1.2 support * feat: removed timestamp type from YAML schema
This commit is contained in:
committed by
GitHub
parent
4cbd04ecae
commit
35fc48c667
@@ -1,4 +1,4 @@
|
||||
import * as yaml from 'js-yaml';
|
||||
import { parseYaml } from '../js-yaml';
|
||||
import { Document, Source } from '../resolve';
|
||||
import { Oas3RuleSet } from '../oas-types';
|
||||
import { RuleConfig, LintConfig, Plugin } from '../config/config';
|
||||
@@ -6,7 +6,7 @@ import { RuleConfig, LintConfig, Plugin } from '../config/config';
|
||||
export function parseYamlToDocument(body: string, absoluteRef: string = ''): Document {
|
||||
return {
|
||||
source: new Source(absoluteRef, body),
|
||||
parsed: yaml.safeLoad(body, { filename: absoluteRef }),
|
||||
parsed: parseYaml(body, { filename: absoluteRef }),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user