Skip to content

Update schema generation doc & add deprecation notice #8453 - #8773

Merged
auvipy merged 4 commits into
encode:masterfrom
tfranzel:refactor_schema_documentation
Nov 22, 2022
Merged

auvipy merged 4 commits into
encode:masterfrom
tfranzel:refactor_schema_documentation

Conversation

@tfranzel

Copy link
Copy Markdown
Contributor

As discussed in #8453, this PR re-arranges some aspects of the schema documentation.

  • schema.md: add deprecation notice
  • documenting-your-api.md: add deprecation notice
  • documenting-your-api.md: push deprecated approach below the recommended one
  • documenting-your-api.md: adapt intro text
  • documenting-your-api.md: recommend drf-spectacular
  • documenting-your-api.md: make clear that drf-yasg is OpenAPI 2

@carltongibson

Copy link
Copy Markdown
Collaborator

Hi @tfranzel thank for this. I think it's the way to go yes.

Ultimately it's @tomchristie's call so we'll defer to him here.

🎁

@lovelydinosaur lovelydinosaur 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.

Wonderful. 💛

Comment thread docs/topics/documenting-your-api.md Resolved
Comment thread docs/topics/documenting-your-api.md Resolved
Comment thread docs/topics/documenting-your-api.md Resolved
Comment thread docs/topics/documenting-your-api.md Resolved
@lovelydinosaur

Copy link
Copy Markdown
Member

@tfranzel - Since this is your PR, I've sent you an invite to the @encode/django-rest-framework team. Please don't feel obligated to accept. If you do choose to, then you'll have permissions to merge/approve this (and other) PRs. If you'd prefer not to, then one of the other maintainers will merge this pull request sometime soon.

@auvipy
auvipy merged commit b87699c into encode:master Nov 22, 2022
@tfranzel

Copy link
Copy Markdown
Contributor Author

thank you @tomchristie for the invitation. happy to join ❤️

@tfranzel
tfranzel deleted the refactor_schema_documentation branch November 22, 2022 14:21
@auvipy

auvipy commented Nov 22, 2022

Copy link
Copy Markdown
Collaborator

BTW, I am still willing to merge small edge case fixes for built in openapi support

@carltongibson

Copy link
Copy Markdown
Collaborator

I think when this is deployed we could likely point back here (or the discussion maybe as better) and close related PRs and Issues. 🤔 (Bottom line is folks are better off moving to drf-spectacular than waiting for a not as good improvement in the in-built introspection.)

I'd suggest the CoreAPI generation could simply be removed at this point. I guess the OpenAPI generation should still be moved out (with tests and everything) to a package so folks can swap an import/setting/etc to use if they need.

I'd guess that all that should remain in schemas should just be the ViewInspector base class and the DefaultSchema helper class. (Would need to verify.)

cweider added a commit to cweider/courtlistener that referenced this pull request Feb 13, 2024
The `django-rest-framework`'s built-in support for OpenAPI schema
generation has been deprecated (encode/django-rest-framework#8773).
`drf-spectacular` is the recommended alternative, but CourtListener's
schema has always been experimental. Moreover the current integration
is crashing and has other bugs that prevent its effective use.
Outright removal, rather than replacement is the best way forward.

Fixes: freelawproject#3653, freelawproject#1616
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants