OpenAPIv3Generator does not remove multiline linter comments from generated yaml.
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start with OpenAPIv3Generator.linterRulePattern and reproduce the multiline proto comment shown in the issue. Check the generated YAML for the example and confirm that the complete multiline linter comment is removed while other linter patterns remain handled.
Written by the indexing model from the issue text.
Description
Multiline linter comments in the proto (those delimited with (-- and --)) are not correctly removed from generated yaml.
As a canonical example of why this is necessary, consider AIP-200, which states:
If an API violates the AIP standards for any reason, there must be an internal comment linking to (aip.dev/not-precedent) to ensure others do not copy the violations or cite the errors as precedent of a "previously approved API".
The comment should also include an explanation of what violates standards and why it is necessary.
The example given of how to format this comment is:
message DailyMaintenanceWindow {
// Time within the maintenance window to start the maintenance operations.
// It must use the format "HH MM", where HH : [00-23] and MM : [00-59] GMT.
// (-- aip.dev/not-precedent: This was designed for consistency with crontab,
// and preceded the AIP standards.
// Ordinarily, this type should be `google.type.TimeOfDay`. --)
Which can be combined with other linter patterns.
Note that this comment is split over multiple lines.
Since these comments are required to follow AIP standards, OpenAPIv3Generator should support removing them as well, but it cannot since OpenAPIv3Generator.linterRulePattern is set to \(-- .* --\), which will not account for newlines.
- Dominant language
- Go
- Stars
- 2.3k
- Forks
- 279
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from google/gnostic
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·