Captitalize the name of the APIs

This commit is contained in:
Grégoire ROCHER 2016-07-28 15:46:35 +02:00
parent 7f3c4188b9
commit 29afba67e1
2 changed files with 6 additions and 6 deletions

View File

@ -180,7 +180,7 @@ class SchemaGenerator(object):
for item in path.strip('/').split('/'):
if '{' in item:
continue
category.append(item)
category.append(item.capitalize())
actions = getattr(callback, 'actions', self.default_mapping)
action = actions[method.lower()]

View File

@ -74,7 +74,7 @@ class TestRouterGeneratedSchema(TestCase):
url='',
title='Example API',
content={
'example': {
'Example': {
'list': coreapi.Link(
url='/example/',
action='get',
@ -104,7 +104,7 @@ class TestRouterGeneratedSchema(TestCase):
url='',
title='Example API',
content={
'example': {
'Example': {
'list': coreapi.Link(
url='/example/',
action='get',
@ -171,7 +171,7 @@ class TestSchemaGenerator(TestCase):
url='',
title='Test View',
content={
'example-view': {
'Example-view': {
'create': coreapi.Link(
url='/example-view/',
action='post',
@ -198,7 +198,7 @@ class TestSchemaAndSubSchemaGenerator(TestCase):
url='',
title='Test View',
content={
'example': {
'Example': {
'list': coreapi.Link(
url='/example/',
action='get',
@ -251,7 +251,7 @@ class TestSchemaAndSubSchemaGenerator(TestCase):
]
)
},
'example-view': {
'Example-view': {
'create': coreapi.Link(
url='/{example_id}/example-view/',
action='post',