Rust Guidelines: RequestContent parameters should not be required to be named `content`
- Dominant language
- PowerShell
- Stars
- 597
- Forks
- 374
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 42
Description
Bad code snippet:
```Rust
pub async fn restore_secret(&self, parameters: RequestContent, options: Option) -> Result> {}
```
What it should do:
The APIView guidelines are outdated here. `RequestContent` parameters should not be enforced to use the name `content` going forward, so `parameters` should be accepted as valid.
Good code snippet:
```Rust
pub async fn restore_secret(&self, parameters: RequestContent, options: Option) -> Result> {}
```
Contributor guide
Research direction
Start with the APIView Rust guidelines rule that validates RequestContent parameter names and trace how the current `content` requirement is applied. Update the rule so `parameters` is accepted for RequestContent, then verify that the provided restore_secret example is treated as valid and that existing naming checks still behave as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100