Take the 2-minute tour ×

My method names get translated from some_method to apiname.resource.somemethod and gapi.client.apiname.resource.somemethod. Example:

@endpoints.method(messages.VoidMessage, messages.VoidMessage,
name='resource.some_method', path='resource/some_method' )
def resource_some_method(self, request):

I've also tested by naming a method with a few underscores in between.

Can this be stopped?

share|improve this question
do you mind if I remove "evilly" from your question? It is both inaccurate and irrelevant. –  bossylobster May 8 '13 at 20:54
add comment

1 Answer

up vote 1 down vote accepted

No. Google's API Infrastructure has strict naming guidelines and these are "enforced" by the SDK code. When deploying your application, your API definition is translated into an API configuration file which is sent of to Google's API Infrastructure to spin up a Discovery-based API of your very own.

Before creating this API config, these names are parsed by the endpoints.message_parser library (called from endpoints.api_config) to make sure your names adhere to the specification. In particular:

split_name = re.split(r'[^0-9a-zA-Z]', name)
normalized = ''.join(
    part[0].upper() + part[1:] for part in split_name if part)

You are free to circumvent this code and generate your own API configuration, but the API deployment will fail as those names will be rejected by Google's API Infrastructure when you deploy.

share|improve this answer
add comment

Your Answer


