Skip to content

Commit fe5ed79

Browse files
bshijskeet
authored andcommitted
Clarify file/dir structural guidance in AIP-191
In issue #151, @lukesneeringer suggested mandating that service definitions and request/response definitions "should definitely be in the same file, particularly for import hygiene in generated code." The language of one of the existing requirements > The RPC request and response `message` definitions, in the same order of the > corresponding methods. Each request message **must** precede its > corresponding response message (if any). implies this to an extent but it's never made explicit.
1 parent 7b46c56 commit fe5ed79

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

aip/general/0191.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ file per service.
4848
APIs with only one file **should** use a filename corresponding to the name of
4949
the API.
5050

51+
API `service` definitions and associated RPC request and response `message`
52+
definitions **should** be defined in the same file.
53+
5154
Bear in mind that the file names often become module names in client libraries,
5255
and customers use them in `import` or `use` statements. Therefore, choosing a
5356
descriptive and language keyword-free filename does matter. For example, a file

0 commit comments

Comments
 (0)