-
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
[3.3+] /api/v2/exsiccata/{identifier}/number endpoint #2245
base: Development
Are you sure you want to change the base?
Conversation
* added the endpoint exsiccata/identifier * indentation fix * remove redundant casting * add quotes to HTML response codes * fix bug where we accidentally removed the array type cast. Sorry, Nikita! -Mark * make removal of lasteditedby more efficient --------- Co-authored-by: Nikita Salikov <[email protected]>
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.
@Atticus29 Tested and it works! But why the title is ".../number/{numberIdentifier}" if this is /number endpoint?
Good call. Yeah, I don't know where those wires got crossed in my brain. Fixed now. Thanks! |
return response()->json(['error' => 'Record not found'], 404); | ||
} | ||
|
||
unset($record->lasteditedby); |
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 don't think this is needed since that field is set to be hidden within the model
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 8061494. That problem was that the QueryBuilder doesn't respect the hidden
array. But switching to stricter eloquent (h/t chatGTP) solved the problem.
* required=false, | ||
* @OA\Schema(type="integer", default=0) | ||
* ), | ||
* @OA\Parameter( |
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.
Within the other endpoint I've listed the required input variables first, with the standard limit and offset variable listed last after all the other input variable. Small issue, but might as well be consistent.
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 60830e7.
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.
Look good to me overall, just a few minor comments.
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.
After changes LGTM too!
Description
This PR adds the /api/v2/exsiccata/{identifier}/number endpoint to the API and docs.
Not to be merged in immediately
This PR creates the API-updates branch, into which future PRs for the API changes can be made.
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!