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

Do not use a leading dot to specify SwaggerRenderer formats #667

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 29, 2020

  1. Do not use a leading dot to specify SwaggerRenderer formats

    DRF expects that custom Renderers use a simple string for the "format":
    https://www.django-rest-framework.org/api-guide/renderers/#custom-renderers
    
    This is also required to support content negotiation via DRF's native
    mechanisms, particularly "format_suffix_patterns":
    https://www.django-rest-framework.org/api-guide/format-suffixes/
    
    Note that all the other DRF-YASG renderers (including OpenAPIRenderer
    and SwaggerUIRenderer) already do the correct thing. This change
    just updates the SwaggerJSONRenderer and SwaggerYAMLRenderer to
    be consistent and correct.
    brianhelba committed Oct 29, 2020
    Configuration menu
    Copy the full SHA
    d0db077 View commit details
    Browse the repository at this point in the history