Skip to content

docs: fix broken examples in usage.md - #1352

Merged
sliverc merged 1 commit into
django-json-api:mainfrom
ryanbromati:fix/usage-md-examples
Oct 29, 2026
Merged

sliverc merged 1 commit into
django-json-api:mainfrom
ryanbromati:fix/usage-md-examples

Conversation

@ryanbromati

@ryanbromati ryanbromati commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1347

Description of the Change

Fixes the four broken examples in docs/usage.md:

  • import SearchFilter from rest_framework.filters instead of rest_framework;
  • import ModelViewSet in the filtering example;
  • correct descriptuon to description in filterset_fields;
  • remove the trailing ) in the manual-output example, import Response, and return Response(data).

Also adds my name to AUTHORS.

Tests

  • PYTHONPATH=. pytest -q → 391 passed
  • flake8 → clean
  • black --check . → clean
  • both Python blocks extracted from docs/usage.md compile

This PR is intentionally docs-only. I can add a doctest/CI check to keep the examples runnable if you'd prefer that here.

Checklist

  • PR only contains one change (docs fix + AUTHORS)
  • unit-test added (docs-only)
  • documentation updated
  • CHANGELOG.md updated (not user-relevant)
  • author name in AUTHORS

@sliverc sliverc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sliverc
sliverc marked this pull request as ready for review October 29, 2026 07:55
@sliverc
sliverc merged commit d8603a7 into django-json-api:main Oct 29, 2026
9 checks passed
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.

usage.md filtering and manual-output examples fail when executed

2 participants