In the example, should we enforce that the GetBookRequest message must be defined in the same file of GetBook method?
If no, it is very hard to ask the API linter to enforce the rules on the request message. Image that GetBook message is defined in the get_book_message.proto, and the RPC method is defined in get_book_service.proto: now consider that get_book_message.proto is checked and committed first, but no issue related to this AIP is found; then get_book_service.proto is checked, it will produce linting errors on the get_book_message.proto, which is undesired.
In the example, should we enforce that the
GetBookRequestmessage must be defined in the same file ofGetBookmethod?If no, it is very hard to ask the API linter to enforce the rules on the request message. Image that
GetBookmessage is defined in theget_book_message.proto, and the RPC method is defined inget_book_service.proto: now consider thatget_book_message.protois checked and committed first, but no issue related to this AIP is found; thenget_book_service.protois checked, it will produce linting errors on theget_book_message.proto, which is undesired.