mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-01 19:10:12 +03:00
Rebase
This commit is contained in:
parent
e799183a52
commit
78e29b320e
|
@ -192,6 +192,9 @@ class TestRouterGeneratedSchema(TestCase):
|
||||||
url='/example/documented_custom_action/',
|
url='/example/documented_custom_action/',
|
||||||
action='get',
|
action='get',
|
||||||
description='A description of the get method on the custom action.',
|
description='A description of the get method on the custom action.',
|
||||||
|
fields=[
|
||||||
|
coreapi.Field('format', required=False, location='query', schema=coreschema.Enum(title='Response format', description="Specify a custom format for the response", enum=[u'json', u'api'])),
|
||||||
|
]
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
'read': coreapi.Link(
|
'read': coreapi.Link(
|
||||||
|
@ -320,6 +323,9 @@ class TestRouterGeneratedSchema(TestCase):
|
||||||
url='/example/documented_custom_action/',
|
url='/example/documented_custom_action/',
|
||||||
action='get',
|
action='get',
|
||||||
description='A description of the get method on the custom action.',
|
description='A description of the get method on the custom action.',
|
||||||
|
fields=[
|
||||||
|
coreapi.Field('format', required=False, location='query', schema=coreschema.Enum(title='Response format', description="Specify a custom format for the response", enum=[u'json', u'api'])),
|
||||||
|
]
|
||||||
),
|
),
|
||||||
'create': coreapi.Link(
|
'create': coreapi.Link(
|
||||||
url='/example/documented_custom_action/',
|
url='/example/documented_custom_action/',
|
||||||
|
@ -328,7 +334,8 @@ class TestRouterGeneratedSchema(TestCase):
|
||||||
encoding='application/json',
|
encoding='application/json',
|
||||||
fields=[
|
fields=[
|
||||||
coreapi.Field('a', required=True, location='form', schema=coreschema.String(title='A', description='A field description')),
|
coreapi.Field('a', required=True, location='form', schema=coreschema.String(title='A', description='A field description')),
|
||||||
coreapi.Field('b', required=False, location='form', schema=coreschema.String(title='B'))
|
coreapi.Field('b', required=False, location='form', schema=coreschema.String(title='B')),
|
||||||
|
coreapi.Field('format', required=False, location='query', schema=coreschema.Enum(title='Response format', description="Specify a custom format for the response", enum=[u'json', u'api'])),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
'update': coreapi.Link(
|
'update': coreapi.Link(
|
||||||
|
@ -338,7 +345,8 @@ class TestRouterGeneratedSchema(TestCase):
|
||||||
encoding='application/json',
|
encoding='application/json',
|
||||||
fields=[
|
fields=[
|
||||||
coreapi.Field('a', required=True, location='form', schema=coreschema.String(title='A', description='A field description')),
|
coreapi.Field('a', required=True, location='form', schema=coreschema.String(title='A', description='A field description')),
|
||||||
coreapi.Field('b', required=False, location='form', schema=coreschema.String(title='B'))
|
coreapi.Field('b', required=False, location='form', schema=coreschema.String(title='B')),
|
||||||
|
coreapi.Field('format', required=False, location='query', schema=coreschema.Enum(title='Response format', description="Specify a custom format for the response", enum=[u'json', u'api'])),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
@ -660,6 +668,9 @@ class TestSchemaGeneratorWithMethodLimitedViewSets(TestCase):
|
||||||
url='/example1/documented_custom_action/',
|
url='/example1/documented_custom_action/',
|
||||||
action='get',
|
action='get',
|
||||||
description='A description of the get method on the custom action.',
|
description='A description of the get method on the custom action.',
|
||||||
|
fields=[
|
||||||
|
coreapi.Field('format', required=False, location='query', schema=coreschema.Enum(title='Response format', description="Specify a custom format for the response", enum=[u'json', u'api'])),
|
||||||
|
]
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
'read': coreapi.Link(
|
'read': coreapi.Link(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user