-
Notifications
You must be signed in to change notification settings - Fork 40
bugfixes #250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfixes #250
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few questions and comments.
It took me some time to figure out exactly what problems this PR was addresing. The referenced issues were extremely terse. I could have used a bit more context in the PR description. This is also why I asked for more focused test files.
openapi-diff/src/modeler/AutoRest.Swagger.Tests/SwaggerModelerCompareTests.cs
Outdated
Show resolved
Hide resolved
"/api/Parameters": { | ||
"put": { | ||
"tags": [ "Parameters" ], | ||
"operationId": "Parameters_Put", | ||
"produces": [ | ||
"text/plain" | ||
], | ||
"parameters": [ | ||
{ | ||
"name": "database", | ||
"in": "body", | ||
"required": true, | ||
"schema": { "$ref": "#/definitions/DatabaseRenamed" } | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"schema":{ | ||
"$ref": "#/definitions/DatabaseRenamed" | ||
} | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the test files should be "minimal" -- contain only what is needed to exercise the particular check being tested.
I don't think any of this is needed for the test.
"/api/Parameters": { | |
"put": { | |
"tags": [ "Parameters" ], | |
"operationId": "Parameters_Put", | |
"produces": [ | |
"text/plain" | |
], | |
"parameters": [ | |
{ | |
"name": "database", | |
"in": "body", | |
"required": true, | |
"schema": { "$ref": "#/definitions/DatabaseRenamed" } | |
} | |
], | |
"responses": { | |
"200": { | |
"schema":{ | |
"$ref": "#/definitions/DatabaseRenamed" | |
} | |
} | |
} | |
} | |
} |
...rc/modeler/AutoRest.Swagger.Tests/Resource/Swagger/old/property_required_status_changed.json
Outdated
Show resolved
Hide resolved
...rc/modeler/AutoRest.Swagger.Tests/Resource/Swagger/old/property_required_status_changed.json
Outdated
Show resolved
Hide resolved
openapi-diff/src/modeler/AutoRest.Swagger.Tests/SwaggerModelerCompareTests.cs
Show resolved
Hide resolved
…CompareTests.cs Co-authored-by: Mike Kistler <mikekistler@microsoft.com>
|
||
// Verify a inline schema of response was changed to reference schema and a new proeprty was added. | ||
[Fact] | ||
public void AddedOptionalPropertyToInlineResponseSchema() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. 👍
fix: don't report error when response schema changed #248
fix No difference reported for required property changed to optional #207
fix Ref model change for property, array item or map items should be a breaking change #233