Azure / openapi-diff

Command line tool to detect breaking changes between two openapi specifications
MIT License
253 stars 34 forks source link

Do not report `AddedRequiredProperty` if the property is `readOnly` #336

Closed konrad-jamrozik closed 1 month ago

konrad-jamrozik commented 1 month ago

Addresses:

Per this specification:

konrad-jamrozik commented 1 month ago

@mikekistler in this PR I am addressing:

https://github.com/Azure/openapi-diff/blob/master/docs/rules/1034.md

(per this comment)

But there are also these rules:

https://github.com/Azure/openapi-diff/blob/master/docs/rules/1010.md https://github.com/Azure/openapi-diff/blob/master/docs/rules/1025.md

Do they also need to be adjusted?

In any case, we can merge this PR and fix up the other rules in future PRs.

mikekistler commented 1 month ago

But there are also these rules:

Rule 1010 only applies to parameters, not properties, so "No" on that one

Unclear if any changes are needed in rule 1025. It says:

Checks whether an existing property's required status is changed from the previous specification.

But the example is a parameter changing required from false to true. If the rule is actually about parameters, then it does not apply.

konrad-jamrozik commented 1 month ago

Pull Request 559774: Update @azure/oad to 0.10.11 + rush update

konrad-jamrozik commented 1 month ago

Deployed to production: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=9767803&view=results