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

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

Merged
merged 4 commits into from
Nov 22, 2022

Conversation

tfranzel
Copy link
Member

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

🎁

Copy link
Member

@tomchristie tomchristie left a comment

Choose a reason for hiding this comment

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

Wonderful. 💛

docs/topics/documenting-your-api.md Outdated Show resolved Hide resolved
docs/topics/documenting-your-api.md Outdated Show resolved Hide resolved
docs/topics/documenting-your-api.md Outdated Show resolved Hide resolved
@tomchristie
Copy link
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
Member Author

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

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

auvipy commented Nov 22, 2022

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

@carltongibson
Copy link
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants