Azure / Azure/azure-openapi-validator
[PutRequestResponseSchemeArm] False positive due to bug in utils.isSchemaEqual()
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 57
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
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

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.
Contributor guide
Assessment
This issue has not been assessed yet.