-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Diff tool does not find differences in form params
If you run diff tool against two swaggers where second swagger removes/changes form params present in first one, diff tool does not report the change
Swagger specification
2.0
Steps to reproduce
First Swagger
{
"swagger": "2.0",
"info": {
"title": "sample",
"version": "__Unknown__"
},
"paths": {
"/api/pet": {
"post": {
"operationId": "func1",
"parameters": [
{
"type": "string",
"description": "description",
"name": "name",
"in": "formData"
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
}
}
}
Second swagger
{
"swagger": "2.0",
"info": {
"title": "sample",
"version": "__Unknown__"
},
"paths": {
"/api/pet": {
"post": {
"operationId": "func1",
"responses": {
"200": {
"description": "OK"
}
}
}
}
}
}
Run the tool:
swagger first second
2023/04/26 17:35:00 Run Config:
2023/04/26 17:35:00 Spec1: first
2023/04/26 17:35:00 Spec2: second
2023/04/26 17:35:00 ReportOnlyBreakingChanges (-c) :false
2023/04/26 17:35:00 OutputFormat (-f) :txt
2023/04/26 17:35:00 IgnoreFile (-i) :none specified
2023/04/26 17:35:00 Diff Report Destination (-d) :stdout
No changes identified%
Expected output:
2023/04/26 17:35:00 Run Config:
2023/04/26 17:35:00 Spec1: first
2023/04/26 17:35:00 Spec2: second
2023/04/26 17:35:00 ReportOnlyBreakingChanges (-c) :false
2023/04/26 17:35:00 OutputFormat (-f) :txt
2023/04/26 17:35:00 IgnoreFile (-i) :none specified
2023/04/26 17:35:00 Diff Report Destination (-d) :stdout
NON-BREAKING CHANGES:
=====================
/api/pet:post - Request - FormData.name<string> - Deleted optional param
compatibility test OK. No breaking changes identified.
Environment
swagger version: 2
go version: 1.19
OS: MacOS Ventura 13.3.1
Metadata
Metadata
Assignees
Labels
No labels