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

FDN-3186 Update scala3 union support for primitive types #708

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

jackl
Copy link
Collaborator

@jackl jackl commented Jan 13, 2025

Adds a de-serializer for the wrapper type in a union when it is a primitive type. Without it, parsing of the response_code type fails with errors, for example:

 apibuilder upload flow api-internal /tmp/flow-api-internal.json --version 0.24.10
Uploading /tmp/flow-api-internal.json to http://localhost:9001/flow/api-internal/0.24.10 ... 
ERROR 409: Unprocessable Entity
 - Response code must be an integer or the keyword 'default' and not[{"integer":{"value":200}}]
 - Response code must be an integer or the keyword 'default' and not[{"integer":{"value":401}}]
 - Response code must be an integer or the keyword 'default' and not[{"integer":{"value":404}}]
 - Response code must be an integer or the keyword 'default' and not[{"integer":{"value":422}}]
 - Response code must be an integer or the keyword 'default' and not[{"integer":{"value":201}}]

@jackl jackl requested review from mbryzek and gheine January 13, 2025 16:51
@jackl jackl merged commit 60d1b0c into main Jan 13, 2025
1 of 2 checks passed
@jackl jackl deleted the union-primitive-type branch January 13, 2025 16:54
@jackl jackl changed the title Update scala3 union support for primitive types FDN-3186 Update scala3 union support for primitive types Jan 13, 2025
Copy link
Collaborator

@mbryzek mbryzek left a comment

Choose a reason for hiding this comment

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

lgtm

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