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

fix payload raw expression #16

Merged
merged 0 commits into from
Mar 16, 2024
Merged

fix payload raw expression #16

merged 0 commits into from
Mar 16, 2024

Conversation

Luap99
Copy link
Contributor

@Luap99 Luap99 commented Mar 11, 2024

The current code cannot handle the ParloadRaw type, serde is unable to deserialize the json with a raw payload fields.

This is because serde cannot handle two fields with the same name and I haven't found a way to make this work like that. Instead we have to use a untagged enum that share both possible payload values.

Therefore this is an API break: NamedExpression now only contains one Payload field which contains the Payload enum, the old Payload type is renamed to PayloadField.

Lastly, export the PayloadRaw fields so they can be used externally.

@JKRhb JKRhb requested a review from jwhb March 11, 2024 16:09
Copy link
Member

@jwhb jwhb left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution. LGTM!

@jwhb jwhb merged commit bab0641 into namib-project:main Mar 16, 2024
1 check passed
@Luap99 Luap99 deleted the payload branch March 16, 2024 17:56
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.

2 participants