mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 09:36:49 +03:00
Fix example override of SchemaGenerator.get_schema()
This commit is contained in:
parent
2e721cdbc8
commit
5e23b559f8
|
@ -181,8 +181,8 @@ dictionary For example you might wish to add terms of service to the [top-level
|
|||
|
||||
```
|
||||
class TOSSchemaGenerator(SchemaGenerator):
|
||||
def get_schema(self):
|
||||
schema = super().get_schema()
|
||||
def get_schema(self, *args, **kwargs):
|
||||
schema = super().get_schema(*args, **kwargs)
|
||||
schema["info"]["termsOfService"] = "https://example.com/tos.html"
|
||||
return schema
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue
Block a user