-
Notifications
You must be signed in to change notification settings - Fork 16
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
[Issue 1165] Setup the v0.1 opportunity endpoints #1213
Merged
Merged
Conversation
This file contains 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
github-actions
bot
added
documentation
Improvements or additions to documentation
python
api
database
labels
Feb 12, 2024
jamesbursa
approved these changes
Feb 13, 2024
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.
Summary
Fixes #1165
Time to review: 15 mins
Changes proposed
Added a new set of
v0.1
opportunity endpoints which are connected to the DB tables, but don't include filtering yetAdded schemas for the expanded opportunity model
A slight adjustment in the structure of pagination in the request
Quite a bit of restructuring/renaming to have versioning be clearer in-code
Add an environment variable for enabling the v0.1 endpoint - only enabled locally at the moment
Context for reviewers
There are follow-up tickets to setup the endpoint including adding filters and mock data. This PR was already pretty big so aimed to just get things connected and restructured and will later build something a bit more meaningful.
The main thing I did with the renaming was to move the routes+schemas into folders for their specific versions. This way we can avoid naming most of the variables
opportunity_blueprint_v0_1
or similar. However, the class name of Marshmallow schemas is registered globally in their internal logic so we can't have two separateOpportunitySchema
classes. I'm hoping we won't need another significant version of the opportunity schemas, so preferred naming the existing onev0
and leaving the version out of the new one.Additional information
The endpoints work locally with the database, returning data as expected. Click the sections below to see the responses.
Click me to see a GET opportunity response
Click me to see a POST opportunities (search) response