-
Notifications
You must be signed in to change notification settings - Fork 279
Fix missing response schema bug #1316
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
1349182
Create a media type object if produces is empty but a response schema…
MaggieKimani1 a53defa
Add a unit test for validation
MaggieKimani1 e9d3660
Default to application/octet-stream as the MIME type if produces is a…
MaggieKimani1 2ba6f70
Revert change; add a default value for produces when its null; remove…
MaggieKimani1 3636351
Update test
MaggieKimani1 6a7993e
Clean up test
MaggieKimani1 66c3e5c
Add test to verify request body schema is set when consumes is an emp…
MaggieKimani1 11d9f68
Revert previous fix
MaggieKimani1 5f90def
Use "application/octet-stream" as default MIME type if produces is an…
MaggieKimani1 9b91130
Combine two checks using TryGetValue() for efficiency
MaggieKimani1 589944d
Merge remote-tracking branch 'origin/vnext' into mk/integrate-json-sc…
MaggieKimani1 dc319ec
Only set produces if it contains a value
MaggieKimani1 845f314
Refactor and clean up code
MaggieKimani1 4e81bf9
Maintain ordering of properties as specified in fixedFieldMap by doin…
MaggieKimani1 ab9648c
Remove unused private method
MaggieKimani1 e666d3d
Add null conditional operator
MaggieKimani1 966b459
Use Assert.Fail() to fail the test
MaggieKimani1 a83f01a
Use static keyword; fix sonarcloud bug
MaggieKimani1 201e90e
Update langVersion to latest
MaggieKimani1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...Api.Readers.Tests/V2Tests/Samples/OpenApiOperation/operationWithBodyAndEmptyConsumes.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Modified from https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#operation-object-example | ||
| summary: Updates a pet in the store with request body | ||
| description: "" | ||
| operationId: updatePetWithBody | ||
| consumes: [] | ||
| produces: | ||
| - application/json | ||
| - application/xml | ||
| parameters: | ||
| - name: petId | ||
| in: path | ||
| description: ID of pet that needs to be updated | ||
| required: true | ||
| type: string | ||
| - name: petObject | ||
| in: body | ||
| description: Pet to update with | ||
| required: true | ||
| schema: | ||
| type: object | ||
| responses: | ||
| '200': | ||
| description: Pet updated. | ||
| '405': | ||
| description: Invalid input |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.