mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-29 17:39:48 +03:00
Update docs/api-guide/schemas.md
Co-authored-by: Adam Johnson <me@adamj.eu>
This commit is contained in:
parent
d21f7afbd8
commit
f4c3d69430
|
@ -182,7 +182,7 @@ 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, *args, **kwargs):
|
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