Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Introduce "open" union types #149

Merged
merged 2 commits into from
Mar 27, 2024
Merged

feat: Introduce "open" union types #149

merged 2 commits into from
Mar 27, 2024

Conversation

sugyan
Copy link
Owner

@sugyan sugyan commented Mar 27, 2024

ref: https://atproto.com/specs/lexicon#union

The data specified by the union type is not necessarily the one defined in refs. (unless closed is explicitly specified with true).
Therefore, we first try to deserialize to the ones defined in the refs using #[serde(untagged)], and if it does not succeed, we store it in Ipld as UnknownData.

Same for records.

@sugyan sugyan merged commit 2165eff into main Mar 27, 2024
9 checks passed
@github-actions github-actions bot mentioned this pull request Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant