Fix Location Header in POST Response header#1626
Merged
severussundar merged 13 commits intomainfrom Aug 19, 2023
Merged
Conversation
Aniruddh25
reviewed
Aug 11, 2023
Aniruddh25
requested changes
Aug 12, 2023
Collaborator
Aniruddh25
left a comment
There was a problem hiding this comment.
Thanks for finding this bug and fixing it! Left few questions..
ayush3797
reviewed
Aug 13, 2023
ayush3797
reviewed
Aug 13, 2023
ayush3797
reviewed
Aug 13, 2023
ayush3797
reviewed
Aug 13, 2023
ayush3797
reviewed
Aug 13, 2023
Contributor
seantleonard
left a comment
There was a problem hiding this comment.
Some suggestions for test layout.
Aniruddh25
approved these changes
Aug 16, 2023
Aniruddh25
reviewed
Aug 16, 2023
seantleonard
requested changes
Aug 17, 2023
Contributor
seantleonard
left a comment
There was a problem hiding this comment.
Concern with trimming >1 consecutive slashes from the URL and treating that as valid url. while //api/Book/id/1 is a "valid URL" , it is not a valid way to access the book entity. That is an invalid path which should result in either a 404 not found or 400 bad request.
Contributor
|
Please ignore the first review as it is a duplicate cause by VScode GitHub PR extension. |
seantleonard
approved these changes
Aug 19, 2023
Contributor
seantleonard
left a comment
There was a problem hiding this comment.
just a last few suggestions before merging.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why make this change?
base-routeis configured in the config file, the Location returned did not account for it. So, a subsequent GET request performed using the Location is unsuccessful.What is this change?
RestController: Logic to construct theLocationheader is updated to accommodate thebase-routefieldRestService: Helper method to extract the configured base-route is addedConfigurationTests: Integration tests to validate the Location field when a) base-route is configured b) base-route is absent for tables and stored procedures are added.How was this tested?
Sample Request(s)
Table and base-route is not configured

Stored Procedure and base-route is not configured

Table and base-route is configured. Configured base-route:

/data-apiStored Procedure and base-route is configured. Configured base-route:

/data-api