Skip to content

[Feature Req] Change the way we handle empty string value in deserialization #2802

@xboxeer

Description

@xboxeer

Describe the issue or request
In this github issue, Azure/azure-sdk-for-net#31701, the keyvault id is an empty string, and SDK is throwing exception that the value cannot be null for property resourceId

Describe your ideas for solutions
We should either not throwing exception when keyvault id is empty string, or we should throw the exception before we are trying to constructing the resource identifior throw an empty string, throwing the exception in the resource identifior ctor will miss a lot of context information.
The keyvault id here can applied to any kind of id property in raw response that SDK is trying to desterilize to a resource identifior

Add labels
As appropriate, select a label to describe how hard the issue is to work
around or how hard it would be to do without a particular feature that
could help make it easier. These labels start with "workaround".

Also select a label that describes how many instances of the workaround
you would have to do without the bug being fixed or feature implemented.
These labels start with "instances".

These labels will help priority bug fixes and feature requests.

If this bug or feature request is for older versions of autorest, please
remove the v3 label and add the v2 label as appropriate.

Metadata

Metadata

Assignees

Labels

MgmtThis issue is related to a management-plane library.v3Version 3 of AutoRest C# generator.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions