Azure / openapi-diff

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

False positives for rule 1007 RemovedClientParameter when using typespec-autorest #280

Open cataggar opened 10 months ago

cataggar commented 10 months ago

Hi, I'm working on https://github.com/Azure/azure-rest-api-specs-pr/pull/15631 and there are a bunch of breaking changes reported for rule 1007. According to https://github.com/Azure/typespec-azure/issues/3795 , these are false positives. Are these false positives? Can the rule be updated to eliminate these false positives?

How can I suppress these false positives? I've tried a few options without luck:

suppressions:
  - code: RemovedClientParameter
    reason: typespec-autorest puts the parameters in each operation
    from: vmware.json
directive:
  - suppress: RemovedClientParameter
    reason: typespec-autorest puts the parameters in each operation
    from: vmware.json
cataggar commented 10 months ago

It sounds like these are not suppressible https://aka.ms/azsdk/pr-suppressions . Please update openapi-diff to not report these false positives.

cataggar commented 10 months ago

From @johanste:

I just did a spot-check on the client parameter breaking change rule, and it seem to be ignoring the x-ms-parameter-location directive. In other words, it complaining about client parameters gone missing because the parameters as not in the parameters section should not complain if said parameter was explicitly marked as not being a client parameter.

mikekistler commented 9 months ago

Also reported here (nearly a year ago): https://github.com/Azure/azure-sdk-tools/issues/5025