mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-06-22 14:33:31 +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):
|
class TOSSchemaGenerator(SchemaGenerator):
|
||||||
def get_schema(self):
|
def get_schema(self, *args, **kwargs):
|
||||||
schema = super().get_schema()
|
schema = super().get_schema(*args, **kwargs)
|
||||||
schema["info"]["termsOfService"] = "https://example.com/tos.html"
|
schema["info"]["termsOfService"] = "https://example.com/tos.html"
|
||||||
return schema
|
return schema
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue
Block a user