From 555db499971d239d00f66c46358a361cfd7390cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ro=C5=BCek?= Date: Wed, 11 Mar 2020 21:17:29 +0800 Subject: [PATCH] fix(yaml): change severity of YAMLIncomaptibleValue diagnostics --- package.json | 2 +- src/__tests__/linter.test.ts | 2 +- .../scenarios/severity/fail-on-error.oas3.scenario | 6 +++--- yarn.lock | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 5b8d2f801..14cc67ca1 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@stoplight/json-ref-resolver": "^3.0.6", "@stoplight/path": "^1.3.0", "@stoplight/types": "^11.2.0", - "@stoplight/yaml": "^3.5.0", + "@stoplight/yaml": "^3.6.0", "abort-controller": "^3.0.0", "ajv": "^6.10", "ajv-oai": "^1.1.5", diff --git a/src/__tests__/linter.test.ts b/src/__tests__/linter.test.ts index b904492c7..5f1ee0212 100644 --- a/src/__tests__/linter.test.ts +++ b/src/__tests__/linter.test.ts @@ -775,7 +775,7 @@ responses:: !!foo line: 1, }, }, - severity: DiagnosticSeverity.Error, + severity: DiagnosticSeverity.Warning, }, ]); }); diff --git a/test-harness/scenarios/severity/fail-on-error.oas3.scenario b/test-harness/scenarios/severity/fail-on-error.oas3.scenario index dd03874f7..fc3df0fa8 100644 --- a/test-harness/scenarios/severity/fail-on-error.oas3.scenario +++ b/test-harness/scenarios/severity/fail-on-error.oas3.scenario @@ -32,10 +32,10 @@ OpenAPI 3.x detected 7:9 warning operation-description Operation `description` must be present and non-empty string. 7:9 warning operation-tags Operation should have non-empty `tags` array. 8:20 error operation-operationId-unique Every operation must have a unique `operationId`. - 10:9 error parser Mapping key must be a string scalar rather than number + 10:9 warning parser Mapping key must be a string scalar rather than number 12:10 warning operation-description Operation `description` must be present and non-empty string. 12:10 warning operation-tags Operation should have non-empty `tags` array. 13:20 error operation-operationId-unique Every operation must have a unique `operationId`. - 15:9 error parser Mapping key must be a string scalar rather than number + 15:9 warning parser Mapping key must be a string scalar rather than number -✖ 12 problems (4 errors, 8 warnings, 0 infos, 0 hints) +✖ 12 problems (2 errors, 10 warnings, 0 infos, 0 hints) diff --git a/yarn.lock b/yarn.lock index 39bb1f178..2e118ab7c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -586,10 +586,10 @@ resolved "https://registry.yarnpkg.com/@stoplight/yaml-ast-parser/-/yaml-ast-parser-0.0.44.tgz#ed3c962564283e9983f7895a6effc3994286df5e" integrity sha512-PdY8p2Ufgtorf4d2DbKMfknILMa8KwuyyMMR/2lgK1mLaU8F5PKWYc+h9hIzC+ar0bh7m9h2rINo32m7ADfVyA== -"@stoplight/yaml@^3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@stoplight/yaml/-/yaml-3.5.0.tgz#ed5462c6b0b82ad492c42740bb816d343f4ed0ab" - integrity sha512-q4HlH4+U5GGL+LHImbz7w29q3M0fMF5c6jE/PbSth5MNBvUNXAX8rxyWWt017LadH8VIoDgnam/0dO/or5SCvQ== +"@stoplight/yaml@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@stoplight/yaml/-/yaml-3.6.0.tgz#ed1257ea7861b3a96d6e870013a9530f013150f1" + integrity sha512-38EhZjNsVwuwrxPawr5R3Q1QhO3l/MTLD5F/d0v7vIrvWgde6GJzdh6rmWbrKJttEqqwuqX8mpLjWihWB7Qm1A== dependencies: "@stoplight/types" "^11.1.1" "@stoplight/yaml-ast-parser" "0.0.44"