Hy I have a question about Google Endpoints when trying to create an Endpoints model method like this:
@DataPoint.method(request_fields=('id',),
path='datapoint/{id}',
http_method='GET',
name='datapoint.get')
def datapoint_get(self, datapoint):
if not datapoint.from_datastore:
raise endpoints.NotFoundException('Datapoint not found.')
return datapoint
I also have the "_message_fields_schema" overwritten in the model itself:
_message_fields_schema = ('id', 'id_datapoint', 'created')
My question is why can't i replace the "id" with "id_datapoint" in "request_fields" and "path" ? I know it can be done by a simple query method, but I'd just like to know why the above doesn't work.
Thanks !