google-cloud-endpoints

apiKeyRequired in google cloud endpoint not getting resolved

故事扮演 提交于 2019-12-25 18:38:31
问题 I am creating google cloud endpoint api, I am trying to use apiKeyRequired = AnnotationBoolean.TRUE as an example on https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/appengine/endpoints-frameworks-v2/backend/src/main/java/com/example/echo/Echo.java @ApiMethod(name = "echo_api_key", path = "echo_api_key", apiKeyRequired =AnnotationBoolean.TRUE) public Message echoApiKey(Message message, @Named("n") @Nullable Integer n) { return doEcho(message, n); } My code is this. IDE is

how to update a GAE app with GCLOUD via socks5 proxy

别来无恙 提交于 2019-12-25 18:29:41
问题 i created my GAE app in development console. i use to update it using appcfg. now i am behind a socks5 proxy, and couldnt find the way to set appcfg to go through. can someone reply all the steps to do it please ? could be using appcfg or gcloud tools thank you very much 回答1: You can use accpcfg or gcloud behind a proxy by setting the HTTP_PROXY or HTTPS_PROXY environment variables. For example, on windows: set HTTP_PROXY=http://cache.mycompany.com:3128 set HTTPS_PROXY=http://cache.mycompany

How does Google Cloud Endpoints map API responses to HTTP Codes?

梦想与她 提交于 2019-12-25 16:42:33
问题 I am using Google Cloud Endpoint for Python. I have an endpoint that throws an Exception in certain cases. According to the documentation, throwing a custom Exception that inherits from endpoints.ServiceException should cause all HTTP status codes from 400-413 to be preserved in the HTTP response. However, my tests show that error code 404 is preserved while 408 and 409 are mapped to a 400. Am I misunderstanding the documentation? Here is my custom Exception class and the 3 different HTTP

Migrating Google cloud endpoints to version v2

强颜欢笑 提交于 2019-12-25 08:48:34
问题 I have referred this link on stack overflow still unable to migrate to version v2. Link Referred from stack overflow After doing changes as suggested in the below link i am getting this error. Link Referred Could not find method google() for arguments [] on repository container. Here is my project level gradle file buildscript { repositories { jcenter() google() } dependencies { classpath 'com.android.tools.build:gradle:3.0.0-alpha8' classpath "com.google.cloud.tools:endpoints-framework

Redeploying OpenAPI spec into App Engine standard environment

泪湿孤枕 提交于 2019-12-25 08:26:54
问题 When I do some changes in OpenAPI spec, which don't involve any changes in the code, do I need to redeploy the code along with the new specification? When I deploy OpenAPI spec with gcloud service-management deploy command I get back in it's output new service configuration version, which I should set to the ENDPOINTS_SERVICE_VERSION parameter in the app.yaml file. I'm not sure but it looks like I have to redeploy the app every time I deploy a new version of my OpenAPI spec, even when the

How to prevent client from changing objectify @ID in Google Cloud Endpoints

痞子三分冷 提交于 2019-12-25 07:30:06
问题 I am using objectify to persist objects to Google Cloud datastore. The "primary key" is annotated with @Id. @Entity class Car { @Id Long id; ... } I generate the client endpoint (using Android Studio). I need getters and setters for all fields, including id, so that REST is able to serialize and deserialize the object. If I don't add getters and setters, then these are created by the Google endpoint builder. Normally, the client GETs an instance from datastore, changes attributes and UPDATEs

How to create a setter for a GeoPt field of a JDO entity in App Engine datastore such that it shows up in the endpoint client library?

≯℡__Kan透↙ 提交于 2019-12-25 06:53:04
问题 I have a GeoPt field for a JDO entity on App Engine and I created the following setter for it: public void setLocation(Float latitude,Float longitude){ location=new GeoPt(latitude, longitude); } However, when I generate the Cloud Endpoints client library through Google Plugin for Eclipse, this method does not show up in the list of methods available for this entity. How should I modify the setter such that the client library creates an endpoint for it? 来源: https://stackoverflow.com/questions

App crashes when creating a new class from endpoint library

巧了我就是萌 提交于 2019-12-25 06:03:24
问题 My app crashes the moment it creates a UserData, which is a class inside an endpoint library in my project. Can anyone help me figure out why? The line that the app crashes on is UserData userData = new UserData(); which shouldbe totally fine. My log cat is after the code. package com.indigohate; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import

App crashes when creating a new class from endpoint library

别说谁变了你拦得住时间么 提交于 2019-12-25 06:02:17
问题 My app crashes the moment it creates a UserData, which is a class inside an endpoint library in my project. Can anyone help me figure out why? The line that the app crashes on is UserData userData = new UserData(); which shouldbe totally fine. My log cat is after the code. package com.indigohate; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import

Why does the generated Cloud Endpoints library change its version now and then?

末鹿安然 提交于 2019-12-25 05:29:22
问题 An App Engine project in Android Studio is (by default) configured to generate a client library, which can be consumed by an Android and/or iOS app. Gradle is configured to auto-generate the library: apply plugin: 'appengine' appengine { downloadSdk = true appcfg { oauth2 = true } endpoints { getClientLibsOnBuild = true getDiscoveryDocsOnBuild = true } } Note there is no version specified anywhere here. As specified in https://cloud.google.com/appengine/docs/java/endpoints/gen_clients, the