deleting/removing an endpoint is considered as non-breaking

Issue #37 closed
Rico M created an issue

So this is what I pass to openapiDiff.diffSpecs(…)

  • the reference (existing) swagger as content string - as destinationSpec
  • the new swagger as content string - as sourceSpec

If I made a REQUIRED attribute as non required (in the new swagger - as sourceSpec), openapi-diff is able to detect it as “type: breaking” with “code: request.body.scope.remove”
However, if I remove/delete an endpoint (in the new swagger - as sourceSpec), openapi-diff sees it as “type: non-breaking” with “code: path.add” - how is that so?

TIA

Comments (4)

  1. Sebastian Tello Account Deactivated

    Hi @Rico M , you are passing the specs in the wrong order.. source is the existing spec, destination is the new spec.

    Regarding the required attribute, making a change from required to non-required in a request schema should be non breaking, once you revert the order of the arguments you should get that.

  2. Log in to comment