Skip to content

Verify the actual response from api, instead of the parsed and potentially modified response #1186

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ivarne
Copy link
Member

@ivarne ivarne commented Mar 13, 2025

Follow up from #1183 (comment)

Use .ScrubMember("version") to remove the nuget version from the info section

Use Microsoft.OpenApi.Readers only to verify that the package don't have validations that break.

Filter out the path parameter {dataType} that is used in the custom swagger file to allow annotation of data type schema

…tally modified response

Use .ScrubMember("version") to remove the nuget version from the info section

Use Microsoft.OpenApi.Readers only to verify that the package don't have validations that break.
@ivarne ivarne added ignore-for-release backport-ignore This PR is a new feature and should not be cherry-picked onto release branches labels Mar 13, 2025
@ivarne ivarne requested a review from martinothamar March 13, 2025 22:26
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
D Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

return settings;
}
await VerifyJson(openApi)
.ScrubMember("version")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this scrub any field called version? That sounds like something we should avoid

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but there isn't any other "version": fields in the open api spec, and if there ever was one, it would show up in the diff we accept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-ignore This PR is a new feature and should not be cherry-picked onto release branches ignore-for-release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants