From 2992b229665036ca6b446abc357c16ede2afca41 Mon Sep 17 00:00:00 2001 From: Heath Stewart Date: Fri, 21 Jun 2024 15:04:27 -0700 Subject: [PATCH] Use TypeSpec body parameter name in Rust (#7713) * Use TypeSpec body parameter name in Rust * Resolve PR feedback --- docs/rust/introduction.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/rust/introduction.md b/docs/rust/introduction.md index 409e0cacd..43d4f4194 100644 --- a/docs/rust/introduction.md +++ b/docs/rust/introduction.md @@ -299,7 +299,9 @@ impl SecretClientMethods for SecretClient { #### Service Methods {#rust-client-methods} -{%include requirement/MUST id="rust-client-methods" %} take a `content: RequestContent` if and only if the service method accepts a request body e.g., `POST` or `PUT`. +{% include requirement/MUST id="rust-client-methods" %} take a `body: RequestContent` if and only if the service method accepts a request body e.g., `POST` or `PUT`. + +{% include requirement/MUST id="rust-client-methods-params" %} use the service specified name of all parameters. {% include requirement/MUST id="rust-client-methods-configuration-name" %} define a client method options struct with the same as the client, client method name, and "Options" e.g., a `set_secret` takes an `Option` as the last parameter. This is required even if the service method does not currently take any options because - should it ever add options - the client method signature does not have to change and will not break callers.