Azure / Azure/typespec-azure

Fix default date-time encoding in headers for typespec-autorest

Open
#2,261 0 comments 0 reactions 0 assignees View on GitHub
bug emitter:autorest triaged:core
Dominant language
TypeScript
Stars
27
Forks
90
Avg merge
1d 22h
Merged PRs (30d)
156

Description

Similar issue for OpenAPI3: https://github.com/microsoft/typespec/issues/2294

Change the default encoding for `utcDateTime` and `offsetDateTime` types to `http-date-rfc7231` when these types appear in http headers.

[Playground](https://azure.github.io/typespec-azure/playground/?c=aW1wb3J0ICJAdHlwZXNwZWMvaHR0cCI7Cgp1c2luZyBIdHRwOwoKb3AgdGVzdChAaGVhZGVyIGZvbzogdXRjRGF0ZVRpbWUpOiB2b2lkOw%3D%3D&e=%40azure-tools%2Ftypespec-autorest&options=%7B%7D)

Contributor guide

Open the contributing guide

Research direction

Start with the typespec-autorest implementation exercised by the linked Playground example, focusing on how utcDateTime and offsetDateTime are encoded when used in HTTP headers. Compare the behavior with the related OpenAPI3 issue 2294. Done means both types default to http-date-rfc7231 in headers and the Playground example produces the expected encoding.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.