Discovery Doc generation missing "format" tag for doubles

79 views
Skip to first unread message

Eric Wasserman

unread,
Feb 7, 2017, 10:19:51 AM2/7/17
to Google App Engine
I upgraded to Cloud Endpoints 2.0 recently. I never saw this issue when generating the now deprecated RPC doc. I believe there is an issue with discovery document generation, where it doesn't create the '"format": "double' for double fields. creditAmount below should have the format tag. 

Fixing this manually for all the similar fields fixed the errors when running the service generator for iOS client library generation. Has anybody else encountered this?

See:


"creditKickbackKash": {
     "httpMethod": "PUT",
     "id": "servUsApi.admin.creditKickbackKash",
     "parameterOrder": [
      "userId",
      "creditAmount"
     ],
     "parameters": {
      "userId": {
       "format": "int64",
       "location": "path",
       "required": true,
       "type": "string"
      },
      "creditAmount": {
       "location": "path",
       "required": true,
       "type": "number"
      }
     },
     "path": "creditKickbackKash/{userId}/{creditAmount}",
     "response": {
      "$ref": "ResultDTO"
     },
     "scopes": [
      "https://www.googleapis.com/auth/userinfo.email"
     ]
    }

Alex (Cloud Platform Support)

unread,
Feb 8, 2017, 1:47:15 PM2/8/17
to Google App Engine

Hi Eric,


As part of the Cloud Endpoints Framework 2.0, the JSON-RPC protocol, which is required for legacy iOS clients and automatic kind fields features are not currently available. See Currently excluded features and tools for Cloud Endpoints 2.0 documentation for more details. In case you require any of these features, migration to Cloud Endpoints 2.0 is currently not recommended.


More on the topic of RPC functionality, you may be interested in the Cloud Endpoints for gRPC APIs concepts which would serve as the new and faster method for directly calling methods on a server application on a different machine. More details on how to use this new feature are provided on the  Configuring a gRPC API Service guide. Note that this is a Beta release of Google Cloud Endpoints. This feature is not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes.

Eric Wasserman

unread,
Feb 8, 2017, 2:58:18 PM2/8/17
to Google App Engine
Thanks for the reply, Alex. I wasnt clear in my question, but I have also upgraded my iOS code to use the new libraries generated by the service generator off of the REST discovery docs. To make the library generation work I was forced to manually add the "format": "double" key/value to all double number types. Any idea why the discovery doc generation is leaving that pair out?

Alex (Cloud Platform Support)

unread,
Feb 9, 2017, 5:33:38 PM2/9/17
to Google App Engine
Thanks for providing additional details, it does seem to be a bug for which I will make a defect report on the google-cloud-platform Issue Tracker. Further details will be posted here on how to follow this issue’s resolution.

Alex (Cloud Platform Support)

unread,
Feb 10, 2017, 12:21:40 PM2/10/17
to Google App Engine

Hi Eric,


Prior proceeding with filing a defect request, I will need to reproduce this issue. Would it be possible for you to provide a minimal working example demonstrating this issue? To do so, you can attach a sample of the code you used to generate the discovery doc in your reply. Let me know in case you would prefer to be contacted in private so to provide your reproduction.

Message has been deleted
Message has been deleted
Message has been deleted

Eric Wasserman

unread,
Feb 10, 2017, 4:49:27 PM2/10/17
to Google App Engine

Alex (Cloud Platform Support)

unread,
Feb 14, 2017, 1:23:30 PM2/14/17
to Google App Engine

Thanks a lot for providing your reproduction. You’ll be glad to know that I have forwarded your observations to the backline team from this Cloud Platform SDK’s Public Issue Tracker thread. Feel free to follow this issue's resolution and post any comments there.


Regards,

Alex

Reply all
Reply to author
Forward
0 new messages