From 5f03867fa9dcb4b628c13d4685ec93a9b05f0a60 Mon Sep 17 00:00:00 2001 From: Rory& Date: Fri, 16 Oct 2026 07:14:13 +0200 Subject: [PATCH] getInvalidSchemaValues: add additionalProperty to instancePath --- assets/openapi.json | Bin 1111593 -> 1111971 bytes assets/schemas.json | Bin 521354 -> 521660 bytes src/schemas/Validator.ts | 6 +++++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/openapi.json b/assets/openapi.json index fd4dbb9d3d7a973322c417a2a9b5986f37825e6e..23c502888c7d44186eb0f37fdaf9a780abe7b118 100644 GIT binary patch delta 153 zcmZ4a#(D93=Y|%>7N!>FEiBL1O@FtRg>Cx8d5jvG*tvrZRS%aYP=zkvma lS%H`hh}nUd1Bf|+m7N!>FEiBL1O~1dMg>8DqdX_8G9TFG=r%woG(QV(kkp+lZftU@5 g*@2h?h&h3n3y8Uam^X@=>8bIh(?2d@j+wrYjb+nx15-wE_Tt>coE(_& tyjv`6?D5I@WvNB+(;EsIwI-SBPfwW0?AyMPodt+lftYRkMt1g_ZvZ@qB}V`N delta 45 ycmdn(schema: string, data: G): G { export function getInvalidSchemaValues(data: object, errors: typeof ajv.errors) { if (errors == null) return []; - return errors.map((e) => getInvalidSchemaValue(data, e.instancePath)); + return errors.map((e) => { + let instancePath = e.instancePath; + if (e.keyword === "additionalProperties") instancePath += `/${e.params.additionalProperty}`; + return getInvalidSchemaValue(data, instancePath); + }); } function getInvalidSchemaValue(data: object, instancePath: string) {