github.com/googleapis/api-linter@v1.65.2/docs/rules/0135/request-name-required.md (about) 1 --- 2 rule: 3 aip: 135 4 name: [core, '0135', request-name-required] 5 summary: Delete RPCs must have a `name` field in the request. 6 permalink: /135/request-name-required 7 redirect_from: 8 - /0135/request-name-required 9 --- 10 11 # Delete methods: Name field 12 13 This rule enforces that all `Delete` standard methods have a `string name` 14 field in the request message, as mandated in [AIP-135][]. 15 16 ## Details 17 18 This rule looks at any message matching `Delete*Request` and complains if 19 the `name` field is missing. 20 21 ## Examples 22 23 **Incorrect** code for this rule: 24 25 ```proto 26 // Incorrect. 27 message DeleteBookRequest { 28 // Field name should be `name`. 29 string book = 1; 30 } 31 ``` 32 33 **Correct** code for this rule: 34 35 ```proto 36 // Correct. 37 message DeleteBookRequest { 38 string name = 1; 39 } 40 ``` 41 42 ## Disabling 43 44 If you need to violate this rule, use a leading comment above the message. 45 Remember to also include an [aip.dev/not-precedent][] comment explaining why. 46 47 ```proto 48 // (-- api-linter: core::0135::request-name-required=disabled 49 // aip.dev/not-precedent: We need to do this because reasons. --) 50 message DeleteBookRequest { 51 string book = 1; 52 } 53 ``` 54 55 If you need to violate this rule for an entire file, place the comment at the 56 top of the file. 57 58 [aip-135]: https://aip.dev/135 59 [aip.dev/not-precedent]: https://aip.dev/not-precedent