-
Notifications
You must be signed in to change notification settings - Fork 50
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
feat: replace django-rest-swagger
with drf-spectacular
#1050
Conversation
django-rest-swagger
with drf-spectacular
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, it looks really nice. I have some questions left.
|
||
# TODO: maybe generate the schema.yml as part of the build process? | ||
|
||
urlpatterns = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think either the 'swagger' view should be the root of those urlpatterns (to emulate the current behavior) or we add a small template with links to the 3 endpoints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing. Will update the url patterns.
At the moment the schema view generates the schema at runtime. drf-spectacular can generate the schema per cli. Should the schema be served from static files instead? What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could create the file before the release and put it in rdmo/share
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And as with the migration, it would be nice if there is a check in the CI if the file is up to date. The build itself should be included into the new build
script: https://github.com/rdmorganiser/rdmo/blob/2.3.0/rdmo/core/management/commands/build.py
c459a3b
to
ad33ced
Compare
should this PR be re-opened and set to |
Yes, @afuetterer , can you open the PR again? We would rebase to |
Yes, will do. |
I can not reopen. |
ah ok, it needed the old target branch ( |
ok, let's continue this then in #1248! 🙏 |
Description
Related issue: #698
Tasks
Types of Changes
Mix between bug fix (deprecated library is replaced), new feature (schema is enhanced) and maybe breaking change (schema is different from before).
Checklist
Refs