When the API endpoint is invoked via the API explorer, or simply via:
$ curl http://localhost:8080//_ah/api/example/v1/getNumber
The following JSON is received
{
"number": "123"
}
Why is "123"
a string? Since the message type was declared as IntegerField()
I expected it to be an integer instead, i.e. I expected the following JSON:
{
"number": 123
}
Setting the variant to a 32 bit integer type fixes the issue.