Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the deprecated CoreAPI-based schema/documentation stack from Django REST framework, leaving OpenAPI as the only built-in schema generation/rendering path and cleaning up associated tests, templates, and optional dependencies.
Changes:
- Remove CoreAPI schema generation, renderers, docs views/templates/assets, and the
CoreAPIClient. - Simplify schema views/management command to OpenAPI-only behavior.
- Delete CoreAPI-focused tests and update remaining tests to match the new surface area.
Reviewed changes
Copilot reviewed 44 out of 49 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/urls.py | Removes docs URLConf usage; leaves empty urlpatterns for test suite. |
| tests/test_templatetags.py | Removes CoreAPI templating tests and related imports. |
| tests/test_renderers.py | Removes DocumentationRenderer/SchemaJSRenderer/CoreAPI renderer tests and imports. |
| tests/test_filters.py | Removes CoreAPI schema field testing and mocks tied to CoreAPI. |
| tests/test_encoders.py | Removes JSONEncoder behavior test specific to coreapi objects. |
| tests/test_api_client.py | Deletes CoreAPIClient integration tests and fixtures. |
| tests/schemas/test_managementcommand.py | Removes CoreAPI mode tests; keeps OpenAPI management command coverage. |
| tests/schemas/test_get_schema_view.py | Removes CoreAPI schema view test path; keeps OpenAPI assertions. |
| tests/schemas/test_coreapi.py | Deletes the CoreAPI schema generator/inspector test suite. |
| rest_framework/utils/encoders.py | Removes JSONEncoder special-casing of coreapi Document/Error objects. |
| rest_framework/test.py | Removes CoreAPIClient from the testing utilities module. |
| rest_framework/templatetags/rest_framework.py | Removes CoreAPI-docs-specific template tags/filters. |
| rest_framework/templates/rest_framework/schema.js | Deletes CoreAPI schema JS bootstrap template. |
| rest_framework/templates/rest_framework/docs/sidebar.html | Deletes legacy interactive docs sidebar template. |
| rest_framework/templates/rest_framework/docs/link.html | Deletes legacy interactive docs endpoint template. |
| rest_framework/templates/rest_framework/docs/langs/shell.html | Deletes CoreAPI CLI snippet template. |
| rest_framework/templates/rest_framework/docs/langs/shell-intro.html | Deletes CoreAPI CLI install snippet template. |
| rest_framework/templates/rest_framework/docs/langs/python.html | Deletes CoreAPI Python client snippet template. |
| rest_framework/templates/rest_framework/docs/langs/python-intro.html | Deletes CoreAPI Python client install snippet template. |
| rest_framework/templates/rest_framework/docs/langs/javascript.html | Deletes CoreAPI JS client snippet template. |
| rest_framework/templates/rest_framework/docs/langs/javascript-intro.html | Deletes CoreAPI JS client loading snippet template. |
| rest_framework/templates/rest_framework/docs/interact.html | Deletes interactive “try it” modal template. |
| rest_framework/templates/rest_framework/docs/index.html | Deletes legacy interactive docs index template. |
| rest_framework/templates/rest_framework/docs/error.html | Deletes legacy docs error template. |
| rest_framework/templates/rest_framework/docs/document.html | Deletes legacy docs document layout template. |
| rest_framework/templates/rest_framework/docs/auth/token.html | Deletes legacy docs token auth modal template. |
| rest_framework/templates/rest_framework/docs/auth/session.html | Deletes legacy docs session auth modal template. |
| rest_framework/templates/rest_framework/docs/auth/basic.html | Deletes legacy docs basic auth modal template. |
| rest_framework/static/rest_framework/docs/js/jquery.json-view.min.js | Deletes legacy docs JSON viewer dependency. |
| rest_framework/static/rest_framework/docs/js/api.js | Deletes legacy docs interactive client JS. |
| rest_framework/static/rest_framework/docs/img/grid.png | Removes legacy docs image asset. |
| rest_framework/static/rest_framework/docs/img/favicon.ico | Removes legacy docs favicon asset. |
| rest_framework/static/rest_framework/docs/css/jquery.json-view.min.css | Deletes legacy docs JSON viewer CSS. |
| rest_framework/static/rest_framework/docs/css/highlight.css | Deletes legacy docs syntax highlight CSS. |
| rest_framework/static/rest_framework/docs/css/base.css | Deletes legacy docs base styling. |
| rest_framework/schemas/views.py | Makes SchemaView renderer selection OpenAPI-only. |
| rest_framework/schemas/coreapi.py | Deletes CoreAPI schema generator/inspectors module. |
| rest_framework/schemas/init.py | Removes CoreAPI exports/selection logic; exports OpenAPI AutoSchema/SchemaGenerator. |
| rest_framework/renderers.py | Deletes CoreAPI renderers + documentation renderer/SchemaJS renderer implementations. |
| rest_framework/pagination.py | Removes CoreAPI get_schema_fields() hooks from pagination classes. |
| rest_framework/management/commands/generateschema.py | Removes CoreAPI modes/format options; OpenAPI-only output. |
| rest_framework/filters.py | Removes CoreAPI get_schema_fields() hooks from filter backends. |
| rest_framework/documentation.py | Deletes legacy docs URL helpers (include_docs_urls, etc.). |
| rest_framework/compat.py | Removes optional coreapi/coreschema shims; keeps uritemplate/yaml/requests optionals. |
| rest_framework/authtoken/views.py | Removes CoreAPI ManualSchema definition from token view. |
| rest_framework/init.py | Removes RemovedInDRF318Warning deprecation warning class. |
| pyproject.toml | Removes CoreAPI-related optional deps; adjusts dependency groups (adds requests, adds uritemplate). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
16d4bae to
8494937
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 46 out of 51 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
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.
Description
Note
Most of this PR was AI generated (Claude code).
At time of opening this, I haven't had time to carefully review the code myself yet, and will put it in ready for review when I've done so.I've now review it and what is removed makes sense, but I'm not sure if there is more we can/shoul remove...Opening this as another attempt to do #9583 opening this for visibility in case others are interested.
Testing status:
FYI @TGoddessana as you started the original PR (do you still have the old commits somewhere?)
Give this a spin
If you want to install this branch on your project:
refs #8453