Skip to content

Commit

Permalink
fix(AIP-203): remove resource name identifier suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
noahdietz committed Oct 4, 2023
1 parent 34f6df3 commit e3edfd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion rules/aip0203/resource_name_identifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ var resourceNameIdentifier = &lint.MessageRule{
Message: "resource name field must have field_behavior IDENTIFIER",
Descriptor: f,
Location: locations.FieldOption(f, fpb.E_FieldBehavior),
Suggestion: "(google.api.field_behavior) = IDENTIFIER",
}}
}

Expand Down
4 changes: 2 additions & 2 deletions rules/aip0203/resource_name_identifier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ func TestResourceNameIdentifier(t *testing.T) {
{
name: "InvalidNoFieldBehavior",
Field: "string name = 1;",
problems: testutils.Problems{{Message: "field_behavior IDENTIFIER", Suggestion: "(google.api.field_behavior) = IDENTIFIER"}},
problems: testutils.Problems{{Message: "field_behavior IDENTIFIER"}},
},
{
name: "InvalidMissingIdentifier",
Field: "string name = 1 [(google.api.field_behavior) = REQUIRED];",
problems: testutils.Problems{{Message: "field_behavior IDENTIFIER", Suggestion: "(google.api.field_behavior) = IDENTIFIER"}},
problems: testutils.Problems{{Message: "field_behavior IDENTIFIER"}},
},
}

Expand Down

0 comments on commit e3edfd6

Please sign in to comment.