Standardise api#222
Merged
keithralphs merged 8 commits intomainfrom May 23, 2023
Merged
Conversation
callumforrester
suggested changes
May 22, 2023
Contributor
callumforrester
left a comment
There was a problem hiding this comment.
Thanks for doing this, just a couple of minor points. Also the CI is unhappy.
Contributor
Author
|
This PR is awaiting Callum's #202, which it will need to be rebased on top of. Until then the Liniting and tests will fail as the signature and purpose of the worker.submit_tasks method and its tests are in flux. Consequently do not merge this until #202 has been cleared and the rebase updates performed |
|
|
||
| @app.get("/plans", response_model=PlanResponse) | ||
| def get_plans(handler: Handler = Depends(get_handler)): | ||
| def get_plans(response: Response, handler: Handler = Depends(get_handler)): |
Contributor
There was a problem hiding this comment.
response is no longer used
ad503ea to
df08a65
Compare
Codecov Report
@@ Coverage Diff @@
## main #222 +/- ##
==========================================
+ Coverage 90.32% 90.37% +0.04%
==========================================
Files 40 40
Lines 1168 1174 +6
==========================================
+ Hits 1055 1061 +6
Misses 113 113
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
callumforrester
approved these changes
May 23, 2023
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.
Rework the existing endpoints to comply with the guidelines:
API version is set in app declaration after loading it from REST config object.
Added function to allow easy appending of endpoint specific response headers to defaults
Submit task method refactored to return task id (currently UUID)