-
-
Notifications
You must be signed in to change notification settings - Fork 323
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
Introduce ui and db API namespaces #1041
Conversation
The idea is to distinguish mathesar.api.filters from mathesar.api.viewsets.filters, since one is referring to Django filters (hence dj_filters) and the other to the Mathesar filter abstraction.
@kgodey @pavish @seancolsen please review changes, particularly to API URL structure. I'm still making subtle changes, but I'd like to get a sanity-check review early. |
@dmos62 Having only read the PR description (and not spent the time to look at the diff), I can offer the following thoughts as a high-level sanity check:
|
@dmos62 Based on @kgodey's comment here I assumed we'd have the client-specific endpoints named as I'm in favour of naming the client specific endpoints as |
@pavish @seancolsen @kgodey I think |
Changed title and description to say that we'll use |
@dmos62 Can you fix merge conflicts in this PR? |
@dmos62 There are some frontend changes on master which are not present in this PR yet. We'll update the frontend urls once this PR is upto date with master. |
@dmos62 @kgodey @seancolsen I've added a commit 5fbb064 for the frontend changes. The commit is a quick workaround to move this PR fast, and I've created a follow-up issue #1054 to deal with frontend changes we'll need in the future. |
@pavish Excuse the premature ping. I see you've started working on the frontend changes 👍 |
@dmos62 The frontend changes are done as mentioned in the above comment. This PR can be marked ready, if this is the only change you've been waiting for. |
A change I've omitted to mention until now is that the file containing Django filters has been renamed to This was done, because we're introducing a lot of code, including namespaces, that are named "filters" and reference Mathesar filters. Having a In retrospect, I should have done that with the PR that adds the new filtering API. In the interest of saving time, I'd rather not move this change to that PR. |
That's fine. |
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.
@@ -0,0 +1,59 @@ | |||
from mathesar.api.display_options import DISPLAY_OPTIONS_BY_TYPE_IDENTIFIER |
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.
Usually we name the test files similarly to the file they're testing, I'd consider renaming this to ui_types
or putting this in tests/api/ui
. Please make this change in a future PR, though, since I don't want to block merge.
@seancolsen This needs your approval as a frontend codeowner. |
Fixes #1029
Splits our API views into two namespaces:
/api/db/v0/*
/api/ui/v0/*
For example:
/api/db/v0/databases/1/functions/
describes the low-level functions API;/api/v0/databases/1/functions
/api/ui/v0/databases/1/types/
describes the high-level UI abstractions,/api/v0/databases/1/types
At the moment of writing, only the Mathesar types endpoint is on the
ui
namespace. The rest of the endpoints just get thedb/
segment inserted in the middle. Moreui
endpoints will follow, e.g. the upcoming (revamped) filters API.Checklist
Update index.md
).master
branch of the repositoryvisible errors.
Developer Certificate of Origin
Developer Certificate of Origin