Skip to content

website: add docs section for encoding decay process#10402

Open
witemple-msft wants to merge 1 commit intomicrosoft:mainfrom
witemple-msft:witemple-msft/encode-decay-docs
Open

website: add docs section for encoding decay process#10402
witemple-msft wants to merge 1 commit intomicrosoft:mainfrom
witemple-msft:witemple-msft/encode-decay-docs

Conversation

@witemple-msft
Copy link
Copy Markdown
Member

This adds a section to the emitter author docs on the website that briefly describes how to handle encoding and mentions http-canonicalization as an approach.

Re: #10293

@github-actions
Copy link
Copy Markdown
Contributor

No changes needing a change description found.

@azure-sdk
Copy link
Copy Markdown
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Copy link
Copy Markdown
Contributor

@markcowl markcowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One questions, otherwise lgtm

2. If it returns `undefined`, no encoding is necessary.
3. If it returns an `EncodeData` object and the emitter recognizes `EncodeData.encoding`, apply that encoding.
4. If it returns `EncodeData` but the emitter does not recognize `EncodeData.encoding`, treat the scalar or property as if its type is `EncodeData.type` instead of the original logical type. We call this process _decay_.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we think the default logic should be to emit a warning diagnostic if an encoding is not understtod by the emitter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

meta:website TypeSpec.io updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants