From v0.7.0 a change in behaviour was introduced by PR https://github.com/RobWin/assertj-swagger/pull/25 which fixes issue #24 . Prior to v0.7.0 a difference between the description on a parameter would not cause a failure. This change isn't an essential part of the fix for issue #24 and I don't believe it was intentional.
"parameters": [
{
"in": "path",
"name": "petId",
"description": "ID of pet that needs to be fetched",
"required": true,
"type": "integer",
"format": "int64"
}
]
From v0.7.0 a change in behaviour was introduced by PR https://github.com/RobWin/assertj-swagger/pull/25 which fixes issue #24 . Prior to v0.7.0 a difference between the description on a parameter would not cause a failure. This change isn't an essential part of the fix for issue #24 and I don't believe it was intentional.
The use of contains and equals in v0.7.0 caused all attributes to be compared rather than just
name
. According to https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#parameterObjectso I've used name and location (in) rather than just name. This fixes #24 without any side effects. I've created a PR https://github.com/RobWin/assertj-swagger/pull/39 for the fix. I used the v0.6.0 code as a base for this fix https://github.com/RobWin/assertj-swagger/blob/v0.6.0/src/main/java/io/github/robwin/swagger/test/ConsumerDrivenValidator.java#L240
That made me notice that https://github.com/RobWin/assertj-swagger/blob/master/src/main/java/io/github/robwin/swagger/test/ConsumerDrivenValidator.java#L305 doesn't validate some other attributes on
path
parameters . I think it makes sense to ignore differences in description text, but it may make sense to validate some of the others e.g.format
,required
, etc