-
Notifications
You must be signed in to change notification settings - Fork 5
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
Api refactor #14
Api refactor #14
Conversation
m30m
commented
Feb 6, 2024
- v1 prefix for all paths
- Use rest style paths
- Make all endpoints return json
- Better internal naming of structures
- Add versioning to opportunity params
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 left a couple naming nitpicks
"/v1/liquidation/submit_opportunity", | ||
post(liquidation::submit_opportunity), | ||
"/v1/liquidation/opportunity", | ||
post(liquidation::post_opportunity), |
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.
this creates a new opportunity? If so, I think it should be a POST to /v1/liquidation/opportunities
to match the usual REST conventions.
auction-server/src/api.rs
Outdated
) | ||
.route("/v1/liquidation/bid", post(liquidation::post_bid)) |
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 think this should be POST /v1/liquidation/opportunities/<opportunity uuid>/bids
auction-server/src/api.rs
Outdated
"/liquidation/submit_opportunity", | ||
post(marketplace::submit_opportunity), | ||
) | ||
.route("/v1/bid", post(bid::bid)) |
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 think this should be /v1/bids
per_sdk/utils/endpoints.py
Outdated
@@ -1,12 +1,7 @@ | |||
LIQUIDATION_SERVER_ENDPOINT = "http://localhost:9000" | |||
LIQUIDATION_SERVER_ENDPOINT = "http://localhost:9000/v1" | |||
AUCTION_SERVER_ENDPOINT = "http://localhost:9000/bid" |
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 think we don't use this anymore?