Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wonderfly opened this issue Jan 10, 2015 · 6 comments
Closed
Assignees
Labels
imported priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@wonderfly
Copy link
Contributor

From rmis...@google.com on September 27, 2011 09:02:18

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 items;
...

But it should actually be
class DetectionsResource extends List {
...

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

Original issue: http://code.google.com/p/google-api-java-client/issues/detail?id=306

@wonderfly wonderfly added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. imported priority: p2 Moderately-important priority. Fix may not be included in next release. 2–5 stars labels Jan 10, 2015
@wonderfly wonderfly self-assigned this Jan 10, 2015
@wonderfly
Copy link
Contributor Author

From rmis...@google.com on September 27, 2011 10:44:08

This issue was reported internally by aiuto@google.com

@wonderfly
Copy link
Contributor Author

From ai...@google.com on September 27, 2011 12:55:56

Cc: -ai...@google.com

@wonderfly
Copy link
Contributor Author

From yan...@google.com on October 06, 2011 09:17:36

Labels: Component-Google-APIs

@wonderfly
Copy link
Contributor Author

From rmis...@google.com on October 28, 2011 13:37:07

Labels: -Milestone-CodeGenVersion1.3.0 Milestone-CodeGenVersion1.4.0

@wonderfly
Copy link
Contributor Author

From rmis...@google.com on November 14, 2011 08:00:04

Status: Accepted

@wonderfly
Copy link
Contributor Author

From rmis...@google.com on January 26, 2012 07:43:36

Status: Fixed

@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imported priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants