Azure / Azure/azure-sdk

Rust Guidelines: RequestContent parameters should not be required to be named `content`

Open
#9,921 0 comments 0 reactions 0 assignees View on GitHub
customer-reported needs-triage question
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.