Skip to content

incorrect handling of unit and newtype variants as query params#1033

Merged
ahl merged 1 commit intomainfrom
issue-1032
Jan 6, 2025
Merged

incorrect handling of unit and newtype variants as query params#1033
ahl merged 1 commit intomainfrom
issue-1032

Conversation

@ahl
Copy link
Collaborator

@ahl ahl commented Jan 6, 2025

Fixes #1032

#1017 regressed the handling of simple (unit) variants such as this as query params:

    pub enum NameOrIdSortMode {
        NameAscending,
        NameDescending,
        IdAscending,
    }

This results in an error like this: Communication Error: builder error: builder error: top-level serializer supports only maps and structs

This PR corrects the handling of these query params and also adds support for newtype variants.

@ahl ahl mentioned this pull request Jan 6, 2025
@ahl ahl merged commit bc2ad09 into main Jan 6, 2025
9 checks passed
@ahl ahl deleted the issue-1032 branch January 6, 2025 17:24
abus-sh pushed a commit to abus-sh/progenitor that referenced this pull request Dec 5, 2025
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.

Enums cannot be serialized

1 participant