Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Switch to drf-spectacular as OAS scheme generator#1082

n2ygk started this conversation inIdeas
Discussion options

Perencode/django-rest-framework#8453 upstream DRF is deprecating the internal schema generator in lieu of recommending use ofdrf-spectactular so we'll need to do the same since our openapi schema support extends DRF's and there have been outstanding upstream improvements (such asencode/django-rest-framework#7516) that will never be implemented in DRF.

You must be logged in to vote

Replies: 1 comment 30 replies

Comment options

Thanks for bringing up this discussion.

So far schema generator has not been deprecated in DRF. Once it is, we should also follow and deprecate it in DJA. Till then, I am happy to integrate small improvements like doc updates or obvious errors etc.

As OpenAPI won't be a direct feature of DRF anymore and also not a requirement of the JSON:API spec I would love to see a separate library based on drf-spectacular to be developed like drf-spectacular-json-api. This would follow the spirit ofDRF anddrf-yasg-json-api is a great example where this worked out well.

Would be anyone willing working on such a library?

You must be logged in to vote
30 replies
@sliverc
Comment options

@n2ygk
As issuejokiefer/drf-spectacular-json-api#20 has now been solved, do you think drf-spectecular-json-api is now on par with DJA?

If so, I would suggest we officially deprecate OAS in DJA as DRF did.

Three things I see we should do:

  1. add a deprecation notice to the schema docs in the lines likeDRF
  2. add a deprecation warning when running the DJA schema command
  3. add drf-spectecular-json-api to the list of our 3rdParty libraries.

What do you think?

@axieum
Comment options

This is great to see.

I support the above points, with the addition to fix the spelling in the repository name.

This rename shouldn't impact functionality as the package appears to have been published with the correct spelling.

@n2ygk
Comment options

n2ygkSep 10, 2024
Maintainer Author

I need to finish integrating it in my demo app to be sure, but it seems like it is better than the existing DRF schema stuff.

@sliverc
Comment options

@n2ygk Good. Let us know once you have it fully integrated and whether you find any other not covered edge cases.

@axieum True, the naming is indeed not consistent. Best report it in the upstream repository so it can be fixed.

@n2ygk
Comment options

n2ygkSep 11, 2024
Maintainer Author

@sliverc I think we are good to go with deprecating the old DRF schema stuff. I've got it working with my demo app and, after making a few teaks and documentation updates, I'll merge thosechanges.

@jokiefer has done a great job with drf-spectacular-json-api!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Ideas
Labels
None yet
6 participants
@n2ygk@sliverc@axieum@tfranzel@jokiefer@hongfanmeng

[8]ページ先頭

©2009-2025 Movatter.jp