@@ -115,7 +115,6 @@ The `get_schema_view()` helper takes the following keyword arguments:
115
115
* ` renderer_classes ` : May be used to pass the set of renderer classes that can
116
116
be used to render the API root endpoint.
117
117
118
-
119
118
## Customizing Schema Generation
120
119
121
120
You may customize schema generation at the level of the schema as a whole, or
@@ -155,7 +154,7 @@ Returns a dictionary that represents the OpenAPI schema:
155
154
The ` request ` argument is optional, and may be used if you want to apply
156
155
per-user permissions to the resulting schema generation.
157
156
158
- This is a good point to override if you want to customise the generated
157
+ This is a good point to override if you want to customize the generated
159
158
dictionary, for example to add custom
160
159
[ specification extensions] [ openapi-specification-extensions ] .
161
160
@@ -184,14 +183,13 @@ provide richer path field descriptions. (The key hooks here are the relevant
184
183
185
184
---
186
185
187
- In order to customise the operation generation, you should provide an ` AutoSchema ` subclass, overriding ` get_operation() ` as you need:
188
-
186
+ In order to customize the operation generation, you should provide an ` AutoSchema ` subclass, overriding ` get_operation() ` as you need:
189
187
190
188
from rest_framework.views import APIView
191
189
from rest_framework.schemas.openapi import AutoSchema
192
190
193
191
class CustomSchema(AutoSchema):
194
- def get_link (...):
192
+ def get_operation (...):
195
193
# Implement custom introspection here (or in other sub-methods)
196
194
197
195
class CustomView(APIView):
@@ -219,4 +217,4 @@ project you may adjust `settings.DEFAULT_SCHEMA_CLASS` appropriately.
219
217
220
218
[ openapi ] : https://github.com/OAI/OpenAPI-Specification
221
219
[ openapi-specification-extensions ] : https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#specification-extensions
222
- [ openapi-operation ] : https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#operationObject
220
+ [ openapi-operation ] : https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#operationObject
0 commit comments