Skip to content

[PutRequestResponseSchemeArm] False positive due to bug in utils.isSchemaEqual() #752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mikeharder opened this issue Oct 28, 2024 · 0 comments
Assignees

Comments

@mikeharder
Copy link
Member

In this check run, run PutRequestResponseSchemeArm appears to fail with a false positive, since the schemas are indeed identical. I believe the bug is in helper function utils.isSchemaEqual():

https://github.com/Azure/azure-openapi-validator/blob/edb65591d5ab85871f880e48b2ad6302186014b8/packages/rulesets/src/spectral/functions/utils.ts

Image

Even if the schemas are equal, if one of the property values is null, it will cause isSchemaEqual() to fail, which looks like a bug to me. Unless there's some reason this behavior was chosen intentionally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants