mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-07 22:04:48 +03:00
Captitalize the name of the APIs
This commit is contained in:
parent
7f3c4188b9
commit
29afba67e1
|
@ -180,7 +180,7 @@ class SchemaGenerator(object):
|
||||||
for item in path.strip('/').split('/'):
|
for item in path.strip('/').split('/'):
|
||||||
if '{' in item:
|
if '{' in item:
|
||||||
continue
|
continue
|
||||||
category.append(item)
|
category.append(item.capitalize())
|
||||||
|
|
||||||
actions = getattr(callback, 'actions', self.default_mapping)
|
actions = getattr(callback, 'actions', self.default_mapping)
|
||||||
action = actions[method.lower()]
|
action = actions[method.lower()]
|
||||||
|
|
|
@ -74,7 +74,7 @@ class TestRouterGeneratedSchema(TestCase):
|
||||||
url='',
|
url='',
|
||||||
title='Example API',
|
title='Example API',
|
||||||
content={
|
content={
|
||||||
'example': {
|
'Example': {
|
||||||
'list': coreapi.Link(
|
'list': coreapi.Link(
|
||||||
url='/example/',
|
url='/example/',
|
||||||
action='get',
|
action='get',
|
||||||
|
@ -104,7 +104,7 @@ class TestRouterGeneratedSchema(TestCase):
|
||||||
url='',
|
url='',
|
||||||
title='Example API',
|
title='Example API',
|
||||||
content={
|
content={
|
||||||
'example': {
|
'Example': {
|
||||||
'list': coreapi.Link(
|
'list': coreapi.Link(
|
||||||
url='/example/',
|
url='/example/',
|
||||||
action='get',
|
action='get',
|
||||||
|
@ -171,7 +171,7 @@ class TestSchemaGenerator(TestCase):
|
||||||
url='',
|
url='',
|
||||||
title='Test View',
|
title='Test View',
|
||||||
content={
|
content={
|
||||||
'example-view': {
|
'Example-view': {
|
||||||
'create': coreapi.Link(
|
'create': coreapi.Link(
|
||||||
url='/example-view/',
|
url='/example-view/',
|
||||||
action='post',
|
action='post',
|
||||||
|
@ -198,7 +198,7 @@ class TestSchemaAndSubSchemaGenerator(TestCase):
|
||||||
url='',
|
url='',
|
||||||
title='Test View',
|
title='Test View',
|
||||||
content={
|
content={
|
||||||
'example': {
|
'Example': {
|
||||||
'list': coreapi.Link(
|
'list': coreapi.Link(
|
||||||
url='/example/',
|
url='/example/',
|
||||||
action='get',
|
action='get',
|
||||||
|
@ -251,7 +251,7 @@ class TestSchemaAndSubSchemaGenerator(TestCase):
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
'example-view': {
|
'Example-view': {
|
||||||
'create': coreapi.Link(
|
'create': coreapi.Link(
|
||||||
url='/{example_id}/example-view/',
|
url='/{example_id}/example-view/',
|
||||||
action='post',
|
action='post',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user