microsoft / microsoft/typespec

directly pass strings to service when serialization datetime objects

Open
#5,771 0 comments 0 reactions 1 assignee Claimed by @iscai-msft View on GitHub
emitter:client:python
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

transferred from https://github.com/Azure/autorest.python/issues/1413

Right now in our vendored msrest code, we silently fail and drop incorrect datetime strings when serializing request bodies (see issue [here](https://github.com/Azure/azure-sdk-for-python/issues/25946)).

What we want to do instead is when serializing a datetime / date / duration etc, is if users pass in a string, we directly pass the string to the service. If they pass a string, that means they serialized it themselves, and we should trust them and rely on the server to do validation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.