From 42f8824fa7104886b44c460b55ed01e02719b22f Mon Sep 17 00:00:00 2001 From: Diego Garcia Date: Thu, 27 Oct 2016 22:00:41 -0200 Subject: [PATCH] simple fix in `schema` documentation --- docs/schema.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/schema.md b/docs/schema.md index b2768bb3..924b47db 100644 --- a/docs/schema.md +++ b/docs/schema.md @@ -9,7 +9,7 @@ renderers the UI (HTML/JS/CSS). **Note:** to render the UI, both renderers must be included. The `OpenAPIRenderer` may be used on its own if you wish to host the UI independently. -### The get_swagger_view shortcut +### The `get_swagger_view` shortcut As a convenience, a shortcut method with sensible default configurations is provided to generate SwaggerUI documentation for your API. This view features the following: @@ -42,10 +42,12 @@ For more detailed documentation on the schema generator, see: Example: Class-based view ```python -from rest_framework.permissions import Allowany +from rest_framework.permissions import AllowAny from rest_framework.response import Response from rest_framework.schemas import SchemaGenerator from rest_framework.views import APIView +from rest_framework_swagger import renderers + class SwaggerSchemaView(APIView): permission_classes = [AllowAny]