summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Flynn <paflynn@google.com>2015-04-14 11:52:27 -0400
committerPatrick Flynn <paflynn@google.com>2015-04-14 11:52:27 -0400
commit874e515e9d580acdc0f1a68c3f6d30bf01e2080b (patch)
tree3c079f285dbadcb0ff2d2055ff788e08091a277f
parent8fb813977bffde91622ed77c035fc33ca2d51a73 (diff)
downloadtools-874e515e9d580acdc0f1a68c3f6d30bf01e2080b.tar.gz
Fix @Api annotation formatting when generating endpoints.
Move from generating the full @Api code into a single line to something that's formatted in a more readable way. Change-Id: Ide4d15b0ca8958be46221365774871e641062e4c
-rw-r--r--resources/templates/GcmEndpoints/root/src/main/MessagingEndpoint.java.ftl10
-rw-r--r--resources/templates/GcmEndpoints/root/src/main/RegistrationEndpoint.java.ftl10
-rw-r--r--resources/templates/HelloEndpoints/root/src/main/MyEndpoint.java.ftl10
3 files changed, 27 insertions, 3 deletions
diff --git a/resources/templates/GcmEndpoints/root/src/main/MessagingEndpoint.java.ftl b/resources/templates/GcmEndpoints/root/src/main/MessagingEndpoint.java.ftl
index 09e8cc1..b954ab8 100644
--- a/resources/templates/GcmEndpoints/root/src/main/MessagingEndpoint.java.ftl
+++ b/resources/templates/GcmEndpoints/root/src/main/MessagingEndpoint.java.ftl
@@ -30,7 +30,15 @@ import static ${packageName}.OfyService.ofy;
* authentication! If this app is deployed, anyone can access this endpoint! If
* you'd like to add authentication, take a look at the documentation.
*/
-@Api(name = "messaging", version = "v1", namespace = @ApiNamespace(ownerDomain = "${endpointOwnerDomain}", ownerName = "${endpointOwnerDomain}", packagePath="${endpointPackagePath}"))
+@Api(
+ name = "messaging",
+ version = "v1",
+ namespace = @ApiNamespace(
+ ownerDomain = "${endpointOwnerDomain}",
+ ownerName = "${endpointOwnerDomain}",
+ packagePath="${endpointPackagePath}"
+ )
+)
public class MessagingEndpoint {
private static final Logger log = Logger.getLogger(MessagingEndpoint.class.getName());
diff --git a/resources/templates/GcmEndpoints/root/src/main/RegistrationEndpoint.java.ftl b/resources/templates/GcmEndpoints/root/src/main/RegistrationEndpoint.java.ftl
index 0f4d085..c3c8fed 100644
--- a/resources/templates/GcmEndpoints/root/src/main/RegistrationEndpoint.java.ftl
+++ b/resources/templates/GcmEndpoints/root/src/main/RegistrationEndpoint.java.ftl
@@ -27,7 +27,15 @@ import static ${packageName}.OfyService.ofy;
* authentication! If this app is deployed, anyone can access this endpoint! If
* you'd like to add authentication, take a look at the documentation.
*/
-@Api(name = "registration", version = "v1", namespace = @ApiNamespace(ownerDomain = "${endpointOwnerDomain}", ownerName = "${endpointOwnerDomain}", packagePath="${endpointPackagePath}"))
+@Api(
+ name = "registration",
+ version = "v1",
+ namespace = @ApiNamespace(
+ ownerDomain = "${endpointOwnerDomain}",
+ ownerName = "${endpointOwnerDomain}",
+ packagePath="${endpointPackagePath}"
+ )
+)
public class RegistrationEndpoint {
private static final Logger log = Logger.getLogger(RegistrationEndpoint.class.getName());
diff --git a/resources/templates/HelloEndpoints/root/src/main/MyEndpoint.java.ftl b/resources/templates/HelloEndpoints/root/src/main/MyEndpoint.java.ftl
index b420697..69ae20c 100644
--- a/resources/templates/HelloEndpoints/root/src/main/MyEndpoint.java.ftl
+++ b/resources/templates/HelloEndpoints/root/src/main/MyEndpoint.java.ftl
@@ -13,7 +13,15 @@ import com.google.api.server.spi.config.ApiNamespace;
import javax.inject.Named;
/** An endpoint class we are exposing */
-@Api(name = "myApi", version = "v1", namespace = @ApiNamespace(ownerDomain = "${endpointOwnerDomain}", ownerName = "${endpointOwnerDomain}", packagePath="${endpointPackagePath}"))
+@Api(
+ name = "myApi",
+ version = "v1",
+ namespace = @ApiNamespace(
+ ownerDomain = "${endpointOwnerDomain}",
+ ownerName = "${endpointOwnerDomain}",
+ packagePath="${endpointPackagePath}"
+ )
+)
public class MyEndpoint {
/** A simple endpoint method that takes a name and says Hi back */