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

samples: Ensure we don't generate standalone samples if sample_type says not to #244

Closed
vchudnov-g opened this issue Nov 1, 2019 · 0 comments · Fixed by #271
Closed
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@vchudnov-g
Copy link
Contributor

As of googleapis/gapic-generator#2996, there is now a sample_type field in the sample config. If not present, it defaults to standalone samples, so current configs will continue to work.

However, some upcoming configs may have it set to produce in-code samples only. In that case, we should make sure we don't produce standalone samples.

@vchudnov-g vchudnov-g added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Nov 1, 2019
@noahdietz noahdietz changed the title Ensure we don't generate standalone samples if sample_type says not to samples: Ensure we don't generate standalone samples if sample_type says not to Nov 1, 2019
vchudnov-g added a commit to vchudnov-g/gapic-generator-go that referenced this issue Dec 12, 2019
This ensures we do not generate standalone samples for a sample config that only requests in-code samples.
This adds utility functions to determine whether a sample config requests standalone samples or in-code samples (it can request both, of course).
Includes tests.

This fixes googleapis#244/
vchudnov-g added a commit that referenced this issue Dec 13, 2019
This ensures we do not generate standalone samples for a sample config that only requests in-code samples.
This adds utility functions to determine whether a sample config requests standalone samples or in-code samples (it can request both, of course).
Includes tests.

This fixes #244.
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants