github.com/googleapis/api-linter@v1.65.2/docs/rules/0162/delete-revision-http-uri-suffix.md (about) 1 --- 2 rule: 3 aip: 162 4 name: [core, '0162', delete-revision-http-uri-suffix] 5 summary: Delete Revision methods must have the correct URI suffix 6 permalink: /162/delete-revision-http-uri-suffix 7 redirect_from: 8 - /0162/delete-revision-http-uri-suffix 9 --- 10 11 # Delete Revision methods: URI suffix 12 13 This rule enforces that Delete Revision methods include the `:deleteRevision` suffix 14 in the REST URI, as mandated in [AIP-162][]. 15 16 ## Details 17 18 This rule looks at any method matching `Delete*Revision`, and 19 complains if the HTTP URI does not end with `:deleteRevision`. 20 21 ## Examples 22 23 **Incorrect** code for this rule: 24 25 ```proto 26 // Incorrect. 27 rpc DeleteBookRevision(DeleteBookRevisionRequest) returns (google.protobuf.Empty) { 28 option (google.api.http) = { 29 delete: "/v1/{name=publishers/*/books/*}:delete" // Should end with `:deleteRevision` 30 }; 31 } 32 ``` 33 34 **Correct** code for this rule: 35 36 ```proto 37 // Correct. 38 rpc DeleteBookRevision(DeleteBookRevisionRequest) returns (google.protobuf.Empty) { 39 option (google.api.http) = { 40 delete: "/v1/{name=publishers/*/books/*}:deleteRevision" 41 }; 42 } 43 ``` 44 45 ## Disabling 46 47 If you need to violate this rule, use a leading comment above the method. 48 Remember to also include an [aip.dev/not-precedent][] comment explaining why. 49 50 ```proto 51 // (-- api-linter: core::0162::delete-revision-http-uri-suffix=disabled 52 // aip.dev/not-precedent: We need to do this because reasons. --) 53 rpc DeleteBookRevision(DeleteBookRevisionRequest) returns (google.protobuf.Empty) { 54 option (google.api.http) = { 55 delete: "/v1/{name=publishers/*/books/*}:delete" 56 }; 57 } 58 ``` 59 60 If you need to violate this rule for an entire file, place the comment at the 61 top of the file. 62 63 [aip-162]: https://aip.dev/162 64 [aip.dev/not-precedent]: https://aip.dev/not-precedent