Azure / Azure/typespec-rust

Add support for models that are exploded query params

Open
#1,020 0 comments 0 reactions 0 assignees View on GitHub
CodeGen
Dominant language
Rust
Stars
7
Forks
11
Avg merge
2d 5h
Merged PRs (30d)
5

Description

```ts
model ExpandParameters {
field: string;
value: string;
}

@route("model{?param*}")
op `model`(param: ExpandParameters): void;
```
Each field in `ExpandParameters` is the query param key/value. So this would effectively become.
```rust
query_builder.set_pair("field", param.field);
query_builder.set_pair("value", param.value);
```

Contributor guide

Open the contributing guide

Research direction

Start by tracing the query_builder.set_pair("field", ...) and set_pair("value", ...) entry points for query parameter serialization. Check how model parameters are currently handled, then implement the exploded model behavior so each field becomes its own query key/value pair, matching the example in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.