CHJani / google-api-java-client

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

Top level schema classes which are arrays are not generated correctly #306

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

In translate we see this entry in schemas.

 "DetectionsResource": {
  "id": "DetectionsResource",
  "type": "array",
  "description": "An array of languages which we detect for the given text The most likely language list first.",
  "items": {
   "type": "object",
   "properties": {
    "confidence": {
     "type": "number",
     "description": "The confidence of the detection resul of this language.",
     "format": "float"
    },
    .....
   }
  }
 }

The code that gets generated for DetectionsResource.java is
class DetectionsResource extends GenericJson {
 @Key
 java.util.List<DetectionsResourceItems> items;
...

But it should actually be
class DetectionsResource extends List<DetectionsResourceItems> {
...

because 'items' is not actually in the JSON stream.

Original issue reported on code.google.com by rmis...@google.com on 27 Sep 2011 at 4:02

GoogleCodeExporter commented 9 years ago
This issue was reported internally by aiuto@google.com

Original comment by rmis...@google.com on 27 Sep 2011 at 5:44

GoogleCodeExporter commented 9 years ago

Original comment by ai...@google.com on 27 Sep 2011 at 7:55

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 6 Oct 2011 at 4:17

GoogleCodeExporter commented 9 years ago

Original comment by rmis...@google.com on 28 Oct 2011 at 8:37

GoogleCodeExporter commented 9 years ago

Original comment by rmis...@google.com on 14 Nov 2011 at 4:00

GoogleCodeExporter commented 9 years ago

Original comment by rmis...@google.com on 26 Jan 2012 at 3:43