Open
Description
The project Azure/openapi-diff produce following output when two versions of a spec are compared: a list of items (error, warning, info) is computed.
Example:
$ oad compare old/added_path.json new/added_path.json
{
"id": "1001",
"code": "NoVersionChange",
"message": "The versions have not changed.",
"jsonref": "#",
"json-path": "#",
"type": "Info"
}
{
"id": "1039",
"code": "AddedOperation",
"message": "The new version is adding an operation that was not found in the old version.",
"jsonref": "#/paths/~1api~1Operations/post",
"json-path": "#/paths/api/Operations/post",
"type": "Info"
}
{
"id": "1038",
"code": "AddedPath",
"message": "The new version is adding a path that was not found in the old version.",
"jsonref": "#/paths/~1api~1Paths",
"json-path": "#/paths/api/Paths",
"type": "Info"
}
The list of rules that are currently checked can be found in their git repository: docs
I had a look at their test suite in this folder: Swagger
To run their the oad
tool against it, I had to perform some changes: Azure/openapi-diff#108
Then I have converted the old Swagger 2.0 format to OpenAPI 3.0.1 format.
Of course, I will share my work.
We can then continue the discussion and see how this could be integrated.