From b2df843256fd7eeea9f7611392a1dbd56eda2919 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Thu, 17 Jul 2025 16:55:59 +0400 Subject: [PATCH] Ignore human overloading error in xpack.info request (#4944) (cherry picked from commit b982f4587f6f21848a0a793d93e94afe73a633c7) --- compiler/src/validation-errors.ts | 14 ++++++++++---- output/schema/validation-errors.json | 6 ------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/compiler/src/validation-errors.ts b/compiler/src/validation-errors.ts index 221e35a072..5260775f3e 100644 --- a/compiler/src/validation-errors.ts +++ b/compiler/src/validation-errors.ts @@ -17,6 +17,10 @@ * under the License. */ +const IGNORED_ERRORS = [ + "request definition xpack.info:Request / query - Property 'human' is already defined in an ancestor class" +] + /** Errors for an endpoint */ export class EndpointError { request: string[] @@ -35,6 +39,10 @@ export class ValidationErrors { /** Add some error information relative to an endpoint's request or response */ addEndpointError (endpoint: string, part: 'request' | 'response', message: string): void { + if (IGNORED_ERRORS.includes(message)) { + return + } + let error = this.endpointErrors[endpoint] if (error == null) { error = { request: [], response: [] } @@ -54,10 +62,8 @@ export class ValidationErrors { let count = 0 const logArray = function (errs: string[], prefix = ''): void { for (const err of errs) { - if (err !== 'Missing request & response') { - console.error(`${prefix}${err}`) - count++ - } + console.error(`${prefix}${err}`) + count++ } } diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 47cde7c6f1..a19de6e203 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -260,12 +260,6 @@ "Request: missing json spec query parameter 'index'" ], "response": [] - }, - "xpack.info": { - "request": [ - "request definition xpack.info:Request / query - Property 'human' is already defined in an ancestor class" - ], - "response": [] } }, "generalErrors": [