-
Notifications
You must be signed in to change notification settings - Fork 53
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
add new exsiccata/{identifier}/number/{numberIdentifier} endpoint #2290
base: API-updates
Are you sure you want to change the base?
add new exsiccata/{identifier}/number/{numberIdentifier} endpoint #2290
Conversation
$limit = $request->input('limit', 100); | ||
$offset = $request->input('offset', 0); | ||
|
||
$numbersResult = DB::table('omexsiccatinumbers')->where('omenid', $identifier)->where('exsNumber', $numberIdentifier)->first(); |
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.
$numberIdentifier is the omexsiccatinumbers primary key (omenid), not the exsNumber value. The exsNumber field is defined as a string within the database and not considered a controlled, robust identifier. Even though it is called the exsiccati number, the value is sometimes a string (e.g. 2A, unknown, cerca 155-6, 6?, etc) and represents a value that can be changed by the user. Path identifiers need persistence identifiers, such as the primary keys or opaque GUID.
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.
Fixed in 6d7af8b
* @OA\Parameter( | ||
* name="numberIdentifier", | ||
* in="path", | ||
* description="Number of exsicatta (exsnumber in the schema) associated with target exsiccata number", |
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.
Should be omenid or the recordID of the omexsiccatinumbers table
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.
Fixed in 6d7af8b. Although I now have to admit that I'm confused about what {identifier} should be, in constrast to {numberIdentifier}. Currently, {identifier} is ometid and {numberIdentifier} is omenid or recordID. Thoughts?
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.
See inline commments
Description
Adds the exsiccata/{identifier}/number/{numberIdentifier} endpoint to the API.
When code reviewing, please make sure that the {identifier} and {numberIdentifier} are the intended targets.
Pull Request Checklist:
Pre-Approval
master
branch and PR'd using the merge option (not squashed) into thehotfix
branch.Development
branch, NOTmaster
Post-Approval
Development
branch, remember to use the squash & merge optionhotfix
branch, remember to use the merge option (i.e., no squash).Development
branch into the master branch, remember to use the merge optionhotfix
branch into themaster
branch use the squash & merge optionmaster
intoDevelopment
should be made with the merge option (i.e., no squash).hotfix
branch and create a newhotfix
branchhotfix
branch.Development
branch before a tagged release (i.e., before an imminent merge into the master branch), make sure to notify the team and lock theDevelopment
branch to prevent accidental merges while QA takes place. Follow the release protocol here.Thanks for contributing and keeping it clean!