Codegen does not implement @clientDefaultValue decorator
- Dominant language
- Rust
- Stars
- 7
- Forks
- 11
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 5
Description
## Summary
The Rust emitter does not implement the `@clientDefaultValue` TypeSpec decorator. Parameters and model properties annotated with `@clientDefaultValue` are generated as plain `Option` fields with no default values applied.
## Expected behavior
- Options structs: Fields with `@clientDefaultValue` should have their defaults pre-populated in the Default trait implementation.
- Model structs: Fields with `@clientDefaultValue` (e.g. retry, tier, timeout on ModelWithDefaultValues) should be pre-populated with their default values in the Default impl.
- Client methods: When the user does not provide a value, the generated client should automatically apply the declared default before sending the request.
## Actual behavior
All `@clientDefaultValue` fields are generated as `Option` defaulting to None. Callers must manually provide the default values.
## Affected crate
`test/spector/azure/client-generator-core/client-default-value`
## Test impact
Several integration tests in this crate have been disabled with `#[ignore]` because they were working around this limitation by manually providing default values. See the test file for details.
Contributor guide
Assessment
This issue has not been assessed yet.