Skip to content

Commit 6ce328b

Browse files
worageeknoid
authored andcommitted
Update STYLE-GUIDE.md (#373)
Add a rule for repeated fields.
1 parent bde333e commit 6ce328b

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

STYLE-GUIDE.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Istio API Style Guide
22

33
This page defines the design guidelines for Istio APIs. They apply to
4-
all proto files in the Istio project. Developers who create their APIs
5-
using Istio may find these guidelines useful as well.
4+
all proto files in the Istio project. Developers who create their own
5+
APIs using Istio should find these guidelines useful as well.
66

77
Since Istio APIs are based on _proto3_ and _gRPC_, we will use
88
Google's [API Design Guide](https://cloud.google.com/apis/design) as
@@ -16,8 +16,8 @@ followed for Istio APIs.
1616
## Naming
1717

1818
Having consistent naming improves understanding of the APIs and reduce
19-
churns on the API design. Istio APIs should follow the following
20-
naming convention:
19+
churns on the API design. Istio APIs should follow these naming
20+
conventions:
2121

2222
* Package names must use `lowercase` without any `_`. Singular words
2323
are recommended to avoid mixture of plural and singular words in
@@ -33,7 +33,10 @@ naming convention:
3333
* Field names must use `lowercase_with_underscore`. For example,
3434
`display_name`.
3535

36-
* Avoid using postpositive adjectives. For example,
36+
* Repeated fields must use proper plural names. For example,
37+
`rules`.
38+
39+
* Avoid using postpositive adjectives in names. For example,
3740
`collected_items` is recommended over `items_collected`.
3841

3942
## Versioning

0 commit comments

Comments
 (0)