Skip to content
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

feat: django-rest-framework #8053

Draft
wants to merge 28 commits into
base: feat/rpc-api
Choose a base branch
from

Conversation

jennifer-richards
Copy link
Member

@jennifer-richards jennifer-richards commented Oct 16, 2024

Add django-rest-framework and friends, then reimplement the existing API. Generates nearly the same API schema with a few notable exceptions:

  • Several URLs have moved around a bit (e.g., things that were under /doc are under /draft or /rfc). This is transparent when using the API generators. We should aim to end up with something logical, but it's easy to adjust.
  • Endpoints that mapped list[<id>] to dict(<id>, <some complex structure>) now just return list[<some complex structure>] because that's easier to express.
  • Error return values are now included via drf-standardized-errors. (Currently only 400/404 to keep noise down, but we can add other types if they're interesting)

Re: the dict mapping, since refactoring those endpoints I believe I have a better idea how to wrangle DRF so I believe we could revert that API change.

The API schema can be generated by running ietf/manage.py spectacular --file rpcapi-generated.yaml. I've temporarily committed a copy of this for comparison (though diffs are pretty noisy)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant