achrefB3 / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

Exception on PersonEmails serialization #226

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Version of google-api-java-client: 1.4.1-beta?
Version of  google-api-services-buzz-v1: 1.0.0-beta

Java environment: App Engine 1.4.3?

Describe the problem.
If I do a get person using the new version of the java api for Buzz in GAE, I 
get an exception during serialization (see below). The obvious problem is that 
the type for the primary variable in com.google.api.buzz.v1.model.PersonEmails 
is of type String but the Google Buzz API returns a boolean.

"primary: expected type Boolean or boolean but got class java.lang.String for 
field public java.lang.String com.google.api.buzz.v1.model.PersonEmails.primary"

How would you expect it to be fixed?
Make "com.google.api.buzz.v1.model.PersonEmails.primary" a Boolean.

Original issue reported on code.google.com by ullisenm...@gmail.com on 4 Jun 2011 at 7:01

GoogleCodeExporter commented 9 years ago
Snippet from the Discovery document:

  "Person": {
   "id": "Person",
   "type": "object",
   "properties": {
...

    "emails": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "primary": {
        "type": "any"
       },
       "type": {
        "type": "any"
       },
       "value": {
        "type": "any"
       }
      }
     }
    },

So we should generate type Object for field 'primary'.

With respect to making "primary" a Boolean, that is a request for the Buzz API 
team:

https://groups.google.com/forum/#!topic/google-buzz-api/VCfrj5NtRwA

Original comment by yan...@google.com on 6 Jun 2011 at 1:25

GoogleCodeExporter commented 9 years ago
Issue 227 has been merged into this issue.

Original comment by yan...@google.com on 6 Jun 2011 at 1:34

GoogleCodeExporter commented 9 years ago
 ullisenm...@gmail.com:

I believe the problem is fixed. I did a first push of a buzz library with the 
fix to our maven repo. Grab the new library here:

http://mavenrepo.google-api-java-client.googlecode.com/hg/com/google/api/service
s/buzz/google-api-services-buzz-v1/1.1.0-beta/google-api-services-buzz-v1-1.1.0-
beta.jar

or try this in your pom.xml file.

  <repositories>
    <repository>
      <id>google-api-services</id>
      <url>http://mavenrepo.google-api-java-client.googlecode.com/hg</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
...

  <dependencies>
    <dependency>
      <groupId>com.google.api.services.buzz</groupId>
      <artifactId>google-api-services-buzz-v1</artifactId>
      <version>1.1.0-beta</version>
    </dependency>

Original comment by ai...@google.com on 16 Jun 2011 at 8:03

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 2 Aug 2011 at 9:53

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 2 Aug 2011 at 9:53