Why doesn't my API appear during deployment?

I suspect this is caused by the following error at the endpoints (if valid), but I am also sure there is a workaround somewhere.

https://code.google.com/p/googleappengine/issues/detail?id=9050&can=4&colspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Log

Steps to play:

  • Change the method name, method API name, or parameter list in the Endpoints class.
  • Run endpoints.sh script to generate the API files.
  • Inspect the API files locally and check for changes. So far so good.
  • Deploy the default version of the application to the server.
  • Check the logs for a call at /_ah/spi/BackendService.getApiConfigs. There are no errors!
  • Go to the API API and clear your browser cache. Check out the API. Change does not exist.
  • Request the API file directly in the browser, for example. https: // [app-id] .appspot.com / _ah / api / discovery / v1 / apis / [api-name] / v1 / rpc The change does not exist.

Frustrated above, I decided to completely start from scratch with a new application identifier. I still don’t see the API in the API and get 404 URLs in step 7 above!

Here is my final class:

@Api(name = "ditto", version = "v1") public class CategoryEndpoint extends BaseEndpoint { @SuppressWarnings("unused") private static final Logger log = Logger.getLogger(CategoryEndpoint.class.getName()); @ApiMethod(name = "category.list") public WireCategory list() { Category root = categoryDao.getRoot(); WireCategory wireRootCategory = new WireCategory(root); return wireRootCategory; } } 

And here is the generated .api file:

 { "extends" : "thirdParty.api", "abstract" : false, "root" : "https://1.eliot-dev-uk-ditto-do.appspot.com/_ah/api", "name" : "ditto", "version" : "v1", "defaultVersion" : false, "adapter" : { "bns" : "https://1.eliot-dev-uk-ditto-do.appspot.com/_ah/spi", "deadline" : 10.0, "type" : "lily" }, "auth" : { "allowCookieAuth" : false }, "frontendLimits" : { "unregisteredUserQps" : -1, "unregisteredQps" : -1, "unregisteredDaily" : -1, "rules" : [ ] }, "cacheControl" : { "type" : "no-cache", "maxAge" : 0 }, "methods" : { "ditto.category.list" : { "path" : "list", "httpMethod" : "GET", "scopes" : [ ], "audiences" : [ ], "clientIds" : [ ], "rosyMethod" : "ditto.api.CategoryEndpoint.list", "request" : { "body" : "empty" }, "response" : { "body" : "autoTemplate(backendResponse)" } } }, "descriptor" : { "schemas" : { "WireCategory" : { "id" : "WireCategory", "type" : "object", "properties" : { "webSafePath" : { "type" : "string" }, "prettyPath" : { "type" : "string" }, "children" : { "type" : "array", "items" : { "$ref" : "WireCategory" } }, "path" : { "type" : "array", "items" : { "type" : "string" } }, "name" : { "type" : "string" }, "id" : { "type" : "string", "format" : "int64" } } } }, "methods" : { "ditto.api.CategoryEndpoint.list" : { "response" : { "$ref" : "WireCategory" } } } } } 

This url gives me 404, where I expect to see my JSON API:

https://eliot-dev-uk-ditto-do.appspot.com/_ah/api/discovery/v1/apis/ditto/v1

This is killing me!

EDIT:

Here's the diff that I just noticed between the .api file created by App Engine 1.7.5 and 1.7.6. Not sure why URLs have changed.

 ditto-v1.api from 1.7.6: { "extends" : "thirdParty.api", "abstract" : false, "root" : "https://1.eliot-dev-uk-ditto-do.appspot.com/_ah/api", "name" : "ditto", "version" : "v1", "defaultVersion" : false, "adapter" : { "bns" : "https://1.eliot-dev-uk-ditto-do.appspot.com/_ah/spi", "deadline" : 10.0, "type" : "lily" } ... ditto-v1.api from 1.7.5: { "extends" : "thirdParty.api", "abstract" : false, "root" : "https://eliot-dev-uk-ditto-do.appspot.com/_ah/api", "name" : "ditto", "version" : "v1", "defaultVersion" : false, "adapter" : { "bns" : "http://eliot-dev-uk-ditto-do.appspot.com/_ah/spi", "deadline" : 10.0, "type" : "lily" } ... 
+4
source share
1 answer

As you already indicated, this was due to a strange problem in the SDK 1.7.6, which adds that 1. at the beginning of the root endpoint URL in the .api files ...

I tried the new SDK 1.7.7 and seems to have decided ...

+2
source

All Articles