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

feat: generate type definition package godoc #142

Merged
merged 2 commits into from
Jan 31, 2023
Merged

feat: generate type definition package godoc #142

merged 2 commits into from
Jan 31, 2023

Conversation

grayside
Copy link
Contributor

Extends the validation test generator to also generate type definition package godoc. This is meant to provide minimal documentation that helps the reader understand how the data type fits into the ecosystem, specifying the Google Cloud Product and the CloudEvent type that uses the data.

@grayside grayside requested a review from a team as a code owner January 20, 2023 21:21
@grayside grayside self-assigned this Jan 20, 2023
@product-auto-label product-auto-label bot added the api: eventarc Issues related to the googleapis/google-cloudevents-go API. label Jan 20, 2023
@grayside grayside added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Jan 27, 2023

// parseValueFromOptionString extracts the value associated with a particular
// field number from the Stringified options.
func parseValueFromOptions(o protoreflect.ProtoMessage, id string) string {
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed out-of-band, there's a tradeoff here that i think we can address better for cross-language docs by adding better docstrings in the original protos.

This parsing is a bit too clever for my liking, but it is a reasonable solution in the short term. 😅

@grayside grayside merged commit b9e2108 into main Jan 31, 2023
@grayside grayside deleted the godoc branch January 31, 2023 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: eventarc Issues related to the googleapis/google-cloudevents-go API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants