Closed sumanswaroop closed 2 years ago
Verified that swagger-diff tool doesn't report it as a breaking change.
Hi @sumanswaroop, I'm gonna check it, sorry for the long wait.
@sumanswaroop fixed. With the new 2.3.0 version that will be released pretty soon (might be even today), you can give it a try.
Consider these two spec files: Old
Lets add a new field in the body parameter Pet which is optional but a field inside that is required.
This means that if Breed is passed in body then it must have name property. Or else we can send the request without the whole breed object.
This is being reported as breaking change.
java -jar /usr/local/lib/swagger-brake-cli-2.2.0.jar --old-api=old.yml --new-api=new.yaml Loading old API from old.yml Loading new API from new.yaml Successfully loaded APIs Starting the check for breaking API changes Check is finished There were breaking API changes R007 Request parameter breed.name is required in PUT /pet/uploadImage
Incase there already exist a optional parameter and we add new required fields inside that, then it qualifies as a breaking change.