@knitli/openapi-mcp 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -344,6 +344,13 @@ function validateSchema(schema, value, closure, depth, context) {
|
|
|
344
344
|
if (schema === false || !isObject(schema))
|
|
345
345
|
schemaFailure();
|
|
346
346
|
for (const key of Object.keys(schema)) {
|
|
347
|
+
// OpenAPI Specification Extensions (`^x-`, OpenAPI 3.1 §4.9) are legal on a Schema Object and
|
|
348
|
+
// carry no validation semantics, so ignore the key and never walk its value -- Cloudflare's
|
|
349
|
+
// API document puts `x-auditable: true` on parameter schemas, and the compiler copies
|
|
350
|
+
// component schemas verbatim. Every other unknown keyword still fails: one with validation
|
|
351
|
+
// semantics (`pattern`, `contains`) must not be silently skipped.
|
|
352
|
+
if (key.startsWith("x-"))
|
|
353
|
+
continue;
|
|
347
354
|
if (!supportedSchemaKeys.has(key))
|
|
348
355
|
schemaFailure();
|
|
349
356
|
}
|
package/package.json
CHANGED