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

fix: Replace string-template with url-template #1108

Merged
merged 5 commits into from Apr 19, 2018

Conversation

MennoTammens
Copy link
Contributor

@MennoTammens MennoTammens commented Apr 6, 2018

Fixes #1099

Path parameters are incorrectly encoded. This fix uses a different module to parse the path parameters, using the same RFC6570 format as the API Discovery Documents uses.

From the [API Discovery Service Documentation]:(https://developers.google.com/discovery/v1/using#build-compose):

The path property of each method in the API uses URI Template v04 syntax. This property may contain variables, which are surrounded by curly braces.

In google-api-nodejs-client the special URI Template operators (+, / and *) were stripped from the path, to make the templates compatible with the string-template module.
The string-template module should be replaced with a URI Template module.

  • npm test succeeds
  • Pull request has been squashed into 1 commit
    • 1 commit with actual changes, 1 commit with regenerated files
  • I did NOT manually make changes to anything in apis/
    • I actually did! src/apis/videointelligence/v1beta1.ts is generated with wrong formatting
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate JSDoc comments were updated in source code (if applicable)
  • Appropriate changes to readme/docs are included in PR

@googlebot
Copy link
Collaborator

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label Apr 6, 2018
@googlebot
Copy link
Collaborator

CLAs look good, thanks!

@googlebot googlebot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Apr 6, 2018
Copy link
Contributor

@JustinBeckwith JustinBeckwith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! Thank you so much for the contribution. We really appreciate it. I had no idea this RFC existed. TIL 😃

@JustinBeckwith JustinBeckwith merged commit 786b0a4 into googleapis:master Apr 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

createApiRequest encodes url, resulting in 404 for pubsub endpoints
3 participants