cloudendpoints / endpoints-java

A Java framework for building RESTful APIs on Google App Engine
Apache License 2.0
32 stars 35 forks source link

Absolute method paths with different prefixes in same API generates an invalid discovery file #74

Closed clementdenis closed 7 years ago

clementdenis commented 7 years ago

If two methods in the same API have no path prefix segments in common (@ApiMethod(path = "/path1/v1") and @ApiMethod(path = "/path2/v1/") for example), the generated discovery file will lack the "servicePath" field. This will make the API explorer call a wrong url: https://.appspot.com/_ah/api/_ah/api/.

In this situation, the legacy framework will output an empty servicePath field instead, which is OK with the API explorer.

Full example here:

tangiel commented 7 years ago

This is fixed by #76