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

Improve RTD documentation #52

Closed
tfranzel opened this issue May 13, 2020 · 2 comments
Closed

Improve RTD documentation #52

tfranzel opened this issue May 13, 2020 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@tfranzel
Copy link
Owner

There have been a lot of feature additions recently. Some work silently in the background, other don't. Someone coming onboard now might have a hard time using some of the more advanced features.

  • Make it easier to adopt drf-spectacular
  • Make transition from drf-yasg easier. some feature basically do the same with a different name.
  • Make it easier to solve common issues.
  • Explain the usage of @extend_schema(|_fields|_serializer), Extensions and hooks and their mechanics.
@tfranzel tfranzel added the documentation Improvements or additions to documentation label May 13, 2020
@MissiaL
Copy link
Contributor

MissiaL commented May 13, 2020

I would also add helper decorators for drf_yasg which proxied requests in extend_scema

swagger_auto_schema should be convert to extend_schema

from drf_spectacular.utils.helpers import swagger_auto_schema, ...

I think this is an interesting idea

@tfranzel
Copy link
Owner Author

that is a excellent idea, but it is probably impractical.

we support a sub-/super-set of the yasg features, e.g. no inspectors. we do have methods, manual_parameters, responses, operation_id, request_body, some of which might work 1to1 and other don't. so i believe its brittle to support this transparently. people will need to change their swagger_auto_schema calls. likely no way around it. on the bright side it is mostly a trivial change.

def swagger_auto_schema(method=None, methods=None, auto_schema=unset, request_body=None, query_serializer=None,
                        manual_parameters=None, operation_id=None, operation_description=None, operation_summary=None,
                        security=None, deprecated=None, responses=None, field_inspectors=None, filter_inspectors=None,
                        paginator_inspectors=None, tags=None, **extra_overrides):

also i don't want to maintain a bridge layer or add functionality we have not needed yet just for the sake of decorator compatibility.

tfranzel added a commit that referenced this issue May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants