Add message for catched error (#74)
* Tune message for catched error * add change log
This commit is contained in:
Родитель
d0b95c706e
Коммит
a08657ebff
|
@ -1,5 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
## 0.13.2
|
||||
|
||||
- Let unified pipeline show message of catched error for model validation and semantic validation.
|
||||
|
||||
## 0.13.1
|
||||
|
||||
- Upgrade oav to 0.22.7 with a fix on parsing error yaml object.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@azure/rest-api-specs-scripts",
|
||||
"version": "0.13.1",
|
||||
"version": "0.13.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@azure/rest-api-specs-scripts",
|
||||
"version": "0.13.1",
|
||||
"version": "0.13.2",
|
||||
"description": "Scripts for the Azure RestAPI specification repository 'azure-rest-api-specs'.",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "dist/index.js",
|
||||
|
|
|
@ -114,7 +114,6 @@ export async function runScript() {
|
|||
} catch (e) {
|
||||
console.error("error: ");
|
||||
console.error(e);
|
||||
//console.log(e)
|
||||
catchedErrors.push({
|
||||
error: e,
|
||||
url: utils.blobHref(
|
||||
|
@ -128,7 +127,7 @@ export async function runScript() {
|
|||
const errorResult: format.MessageLine = catchedErrors.map((it) => ({
|
||||
type: "Raw",
|
||||
level: "Error",
|
||||
message: it.error.stack || "",
|
||||
message: it.error.message || "",
|
||||
time: new Date(),
|
||||
extra: {
|
||||
role: "Model Validation",
|
||||
|
|
|
@ -108,7 +108,6 @@ export async function runScript() {
|
|||
|
||||
let exitCode: number = 0;
|
||||
const catchedErrors: { error: Error; url: string }[] = [];
|
||||
|
||||
for (const swagger of swaggersToProcess) {
|
||||
try {
|
||||
const validator = new oav.SemanticValidator(swagger, null,
|
||||
|
@ -175,7 +174,6 @@ export async function runScript() {
|
|||
prettyPrint(validateSpec.warnings as ValidationEntry[], "warning");
|
||||
fs.appendFileSync("pipe.log", JSON.stringify(pipelineResultWarnings) + "\n");
|
||||
}
|
||||
|
||||
exitCode = 1;
|
||||
}
|
||||
}
|
||||
|
@ -198,7 +196,7 @@ export async function runScript() {
|
|||
const errorResult: format.MessageLine = catchedErrors.map((it) => ({
|
||||
type: "Raw",
|
||||
level: "Error",
|
||||
message: it.error.stack || "",
|
||||
message: it.error.message || "",
|
||||
time: new Date(),
|
||||
extra: {
|
||||
role: "Semantic Validation",
|
||||
|
|
Загрузка…
Ссылка в новой задаче