Skip to content

Generated code doesn't work for Firestore #17

Open
@xJonathanLEI

Description

@xJonathanLEI

The Firestore API requires building request URLs in the format of v1/{parent}/databases, where parent takes the form of projects/{project_id}.

The code generated by this generator URL-encodes this parent param like so:

let rel_path = format!(
    "v1/{parent}/databases",
    parent = percent_encode(format!("{}", params.parent).as_bytes(), NON_ALPHANUMERIC)
);
let path = self.format_path(rel_path.as_str());

Therefore, the request path becomes:

/v1/projects%2Fproject_id/databases

whereas it should be:

/v1/projects/project_id/databases

This mis-handling of URL is causing 404 errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions