Azure / Azure/azure-sdk-for-rust

Serialize read-only fields to allow customers to serialize our models for other use

Open
#4,269 0 comments 0 reactions 0 assignees View on GitHub
Azure.Core Client
Dominant language
Rust
Stars
884
Forks
365
Avg merge
2d 19h
Merged PRs (30d)
112

Description

We did a change in the emitter a short while back to change `skip_serializing_if = Option::is_none` (or similar) to `skip_serializing` for read-only fields to avoid serializing them and sending them back to the sevice (which should ignore them, but you never know).

The downstream impact is that any applications that want to re-serialize those models to, say, their own object database, can't with our models. They can, however, copy our definitions and serialize everything like I did in https://github.com/Azure/azure-sdk-for-rust/issues/2397. So they aren't blocked, but we make it a little harder.

Contributor guide

Open the contributing guide

Research direction

Start with the emitter change that replaced conditional serialization for read-only fields, then compare the copied definitions and approach described in issue #2397. Determine how the generated models can support customer-side serialization without sending read-only fields back to the service. Done means the service request behavior remains safe while downstream applications can serialize the models for other storage or use.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.