You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In developing the fix for Azure/azure-sdk-tools#6840, we discovered that the special logic in lib/swaggerValidator/ajvSchemaValidator.ts for x-ms-mutability doesn't work when that property is a sibling of "$ref".
// If a response has x-ms-mutability property and its missing the read we can skip this error
if (
cxt.isResponse &&
((keyword === "required" &&
(parentSchema.properties?.[(params as any).missingProperty]?.[xmsMutability]?.indexOf(
"read"
) === -1 ||
// required check is ignored when x-ms-secret is true
(parentSchema.properties?.[(params as any).missingProperty] as any)?.[xmsSecret] ===
true)) ||
(keyword === "type" && data === null && parentSchema[xmsMutability]?.indexOf("read") === -1))
) {
return true;
}
Autorest allows some properties to be siblings of $ref, and specifically any "x-" properties.
In developing the fix for Azure/azure-sdk-tools#6840, we discovered that the special logic in
lib/swaggerValidator/ajvSchemaValidator.ts
forx-ms-mutability
doesn't work when that property is a sibling of "$ref".https://github.com/Azure/oav/blob/develop/lib/swaggerValidator/ajvSchemaValidator.ts#L288
Autorest allows some properties to be siblings of $ref, and specifically any "x-" properties.
https://github.com/Azure/autorest/blob/main/docs/openapi/howto/%24ref-siblings.md
The text was updated successfully, but these errors were encountered: