-
Notifications
You must be signed in to change notification settings - Fork 4
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
Define Endpoints for Search API #284
Define Endpoints for Search API #284
Conversation
- Matching DataGateway API's class structure, with relevant TODOs to add in code when endpoints are defined and implemented
- Since this repository will support DataGateway API and the Search API, there needs to be some changes in directory structure to split the different files up. Essentially this means adding `datagateway_api/` and `search_api/` in `common/` and `src/resources/` - The imports will be fixed in a future commit
- Reverting back so the tests pass until I re-implement the config
- Directory structure due to implementation of search API
- These functions had the same function names as the ones defined for DataGateway API
- Collisions were occurring between `/datasets` between DataGateway API and the Search API despite the `/search_api` extension
0e35684
to
b59abba
Compare
…ndpoint-definition-#257
Codecov Report
@@ Coverage Diff @@
## master #284 +/- ##
==========================================
+ Coverage 84.82% 85.97% +1.14%
==========================================
Files 36 36
Lines 2584 2603 +19
Branches 207 208 +1
==========================================
+ Hits 2192 2238 +46
+ Misses 368 342 -26
+ Partials 24 23 -1
Continue to review full report at Codecov.
|
…ndpoint-definition-#257
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.
Looks good and all the endpoints return null
as expected. I feel as though a version bump is necessary though I am not sure which one should be used. Might be a good idea getting thoughts from others on this.
…ndpoint-definition-#257
This PR will close #257
Description
This PR defines endpoints which need to be implemented for the search API.
I've used the
endpoint=
argument foradd_resource()
to prevent naming collisions between endpoints. This was happening with endpoints like/datasets
(DataGateway API endpoint) and/search_api/datasets
even though they're actually different endpoints. Usingendpoint=
fixed this.#256 isn't implemented yet so the search API endpoints are always created. Once the new config has been implemented, endpoint creation should respect the config and only create them when they are wanted by the user. I have also hardcoded the extension which should be changed to look up the relevant config value once #256 is closed.
To remember to resolve both TODOs, I have opened #283 to tackle these issues once #256 and #257 have been completed.
Testing Instructions
Run the API on this branch and ensure that you can send requests to each of the newly defined endpoints (e.g.
/search_api/datasets
) which return a 200 and a response body ofnull
.I was a little undecided on whether this needs a version bump or not. I've gone for feature because these changes do add in new endpoints, even if they are unimplemented. I would welcome an alternative view on this though, I'm not sure if a different (or even no) version bump is more appropriate.
icatdb Generator Script Consistency Test
CI job fails, is this because of a deliberate change made to the script to change generated data (which isn't actually a problem) or is here an underlying issue with the changes made?fix:
,feat:
orBREAKING CHANGE:
so a release is automatically made via GitHub Actions upon merge?Agile Board Tracking
Connect to #257