Skip to content

Commit

Permalink
Clarify file/dir structural guidance in AIP-191
Browse files Browse the repository at this point in the history
In issue aip-dev#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.
  • Loading branch information
bshi authored and jskeet committed Mar 30, 2022
1 parent 7b46c56 commit fe5ed79
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aip/general/0191.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ file per service.
APIs with only one file **should** use a filename corresponding to the name of
the API.

API `service` definitions and associated RPC request and response `message`
definitions **should** be defined in the same file.

Bear in mind that the file names often become module names in client libraries,
and customers use them in `import` or `use` statements. Therefore, choosing a
descriptive and language keyword-free filename does matter. For example, a file
Expand Down

0 comments on commit fe5ed79

Please sign in to comment.