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

docs: library generation example of Geo #8745

Merged
merged 5 commits into from
Dec 5, 2022
Merged

Conversation

suztomo
Copy link
Member

@suztomo suztomo commented Nov 8, 2022

Adding an advanced options for client library generation.

@suztomo suztomo requested a review from alicejli November 8, 2022 20:54
Copy link
Contributor

@alicejli alicejli left a comment

Choose a reason for hiding this comment

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

I'm a little unclear what some of these extra options map to. Should we assume that we need to use this command for any API that's not within google/cloud?

--name-pretty="Routes API" \
--product-docs="https://developers.google.com/maps/documentation/routes" \
--api-description="Routes API is the next generation, performance optimized version of the existing Directions API and Distance Matrix API. It helps you find the ideal route from A to Z, calculates ETAs and distances for matrices of origin and destination locations, and also offers new features." \
--api-id=routes.googleapis.com \
Copy link
Contributor

Choose a reason for hiding this comment

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

what does api-id do?

--api-description="Routes API is the next generation, performance optimized version of the existing Directions API and Distance Matrix API. It helps you find the ideal route from A to Z, calculates ETAs and distances for matrices of origin and destination locations, and also offers new features." \
--api-id=routes.googleapis.com \
--cloud-api=false \
--requires-billing=true \
Copy link
Contributor

Choose a reason for hiding this comment

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

should requires-billing be set in general?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's default to true.

--api-id=routes.googleapis.com \
--cloud-api=false \
--requires-billing=true \
--distribution-name="com.google.maps:google-maps-routing"
Copy link
Contributor

Choose a reason for hiding this comment

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

what does distribution-name map to?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's Group ID and artifact ID.

@suztomo
Copy link
Member Author

suztomo commented Nov 9, 2022

@alicejli Good point. I've enriched the "help" option of the command and added these explanation. PTAL.

Copy link
Contributor

@alicejli alicejli left a comment

Choose a reason for hiding this comment

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

Thank you for updating this documentation Tomo! It makes it much clearer what the different options map to. I've left a couple nits, but feel free to merge and we can update those later. Thank you again!

The first library generation is always
'preview'.
--transport [grpc|http|both] A label that appears in repo-metadata.json
--language TEXT
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding short description: "Defaults to 'java'".

--api-id TEXT The value of the apiid parameter used in
README.md It has link to https://console.clo
ud.google.com/flows/enableapi?apiid=<api_id>
--requires-billing BOOLEAN Based on this value, README.md explains
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding: "Defaults to true".

Copy link
Member Author

Choose a reason for hiding this comment

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

Added default values in help.

distribution name is not set
--owlbot-image TEXT The owlbot container image used in
OwlBot.yaml
--library-type TEXT A label that appear in repo-metadata.json to
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding: "Defaults to GAPIC_AUTO".

A label that appears in repo-metadata.json.
The first library generation is always
'preview'.
--transport [grpc|http|both] A label that appears in repo-metadata.json
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding: "Defaults to grpc"

Copy link
Member Author

Choose a reason for hiding this comment

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

Added default values in help.

Copy link
Member Author

@suztomo suztomo left a comment

Choose a reason for hiding this comment

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

@alicejli PTAL. Now the default values are printed in the help command.

--api-id TEXT The value of the apiid parameter used in
README.md It has link to https://console.clo
ud.google.com/flows/enableapi?apiid=<api_id>
--requires-billing BOOLEAN Based on this value, README.md explains
Copy link
Member Author

Choose a reason for hiding this comment

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

Added default values in help.

A label that appears in repo-metadata.json.
The first library generation is always
'preview'.
--transport [grpc|http|both] A label that appears in repo-metadata.json
Copy link
Member Author

Choose a reason for hiding this comment

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

Added default values in help.

@suztomo suztomo added the automerge Merge the pull request once unit tests and other checks pass. label Dec 5, 2022
@gcf-merge-on-green gcf-merge-on-green bot merged commit dab41cb into main Dec 5, 2022
@gcf-merge-on-green gcf-merge-on-green bot deleted the suztomo-patch-1 branch December 5, 2022 20:44
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Dec 5, 2022
@release-please release-please bot mentioned this pull request Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants