Skip to content

Commit 4098b57

Browse files
earth2marshrambleraptortoumorokoshi
authored
adding missing links, example improvement, and retitle-ing (#104)
* adding missing links & retitle-ing * improved initial example made the error more obvious and provided a corrected version for contrast * Update README.md Co-authored-by: Yusuke Tsutsumi <[email protected]> --------- Co-authored-by: Alex Stephen <[email protected]> Co-authored-by: Yusuke Tsutsumi <[email protected]>
1 parent c35c926 commit 4098b57

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,37 @@
1-
# Google API Linter
1+
# AEP Protobuf Linter
22

33
[![ci](https://github.com/aep-dev/api-linter/actions/workflows/ci.yaml/badge.svg)](https://github.com/aep-dev/api-linter/actions/workflows/ci.yaml)
44
![latest release](https://img.shields.io/github/v/release/aep-dev/api-linter)
55
![go version](https://img.shields.io/github/go-mod/go-version/aep-dev/api-linter)
66

77
The API linter provides real-time checks for compliance with many of the API
8-
standards, documented using [API Enhancement Proposals][]. It operates on API
9-
surfaces defined in [protocol buffers][]. For APIs defined in
10-
[OpenAPI specification][] an equivalent [OpenAPI specification linter][] is
8+
standards, documented using [API Enhancement Proposals](https://aep.dev). It operates on API
9+
surfaces defined in [protocol buffers][].
10+
11+
For APIs using the
12+
[OpenAPI Specification][], an equivalent [OpenAPI linter](https://github.com/aep-dev/aep-openapi-linter) is
1113
available.
1214

1315
It identifies common mistakes and inconsistencies in API surfaces:
1416

1517
```proto
16-
// Incorrect.
18+
// Incorrect: Do not use the resource type as the field name here.
1719
message GetBookRequest {
18-
// This is wrong; it should be spelled `name`.
20+
// Field names for resource identifiers in Get requests must be `name`.
21+
// Tools and standards expect this for consistency and interoperability.
1922
string book = 1;
2023
}
2124
```
22-
2325
When able, it also offers a suggestion for the correct fix.
26+
```proto
27+
// Correct: This version follows AEP-148, which requires resource identifiers in Get requests to use the field name `name`.
28+
// See https://aep.dev/148/ for details.
29+
message GetBookRequest {
30+
// The name of the book to retrieve.
31+
// Format: publishers/{publisher}/books/{book}
32+
string name = 1;
33+
}
34+
```
2435

2536
[_Read more ≫_](docs/index.md)
2637

0 commit comments

Comments
 (0)