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

RunQueryResponse should be an array #145

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

lostbean
Copy link

Querying something on:
https://firestore.googleapis.com/v1/projects/xxxxx/databases/(default)/documents:runQuery

returns this:

[ { "document": { "name": "projects/xxxxx/databases/(default)/documents/doc/000000000", "fields": { "lastUpdate": { ... } } ]

Which is a list of RunQueryResponses instead of the single one. I'm not sure if this patch is applied to the right place due the code generation but I couldn't figure out exactly where to do it. If someone can point me the correct direction, I'll update this PR.

@tonicebrian
Copy link
Collaborator

Hi @lostbean , I think the patch cannot be applied as-is because the code is generated from the JSON in https://firestore.googleapis.com/$discovery/rest?version=v1 and you can see there that there is a single RunQueryResponse.

On the other hand, the Protobuf API definitions state a stream of responses (see https://github.com/googleapis/googleapis/blob/master/google/firestore/v1/firestore.proto#L132) so we have oficial API documents with conflicting definitions.

I guess we cannot do anything except to request to update the JSON APIs to Google. Do you have a code snippet showing the fault we could use in this PR as documentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants