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

Optional fields are marked as missing when Producing messages #1265

Closed
xontab opened this issue Nov 16, 2022 · 10 comments
Closed

Optional fields are marked as missing when Producing messages #1265

xontab opened this issue Nov 16, 2022 · 10 comments
Assignees
Labels
bug Something isn't working topic data Kafka Topic data

Comments

@xontab
Copy link

xontab commented Nov 16, 2022

When producing new messages in AKHQ v0.23.0, fields that are not specified in the payload are marked as missing even if they are nullable or have default values.

This feature looks related to a recent PR #1233 which was released in v0.23.0.

I think that the schemaFields need to be filtered to exclude any fields with default and when the type can be null. This used to work this way on previous versions of AKHQ.

@tchiotludo
Copy link
Owner

@GnanaJeyam maybe you can take this one ?

@tchiotludo tchiotludo added bug Something isn't working topic data Kafka Topic data labels Nov 16, 2022
@tchiotludo tchiotludo assigned tchiotludo and unassigned tchiotludo Nov 16, 2022
@GnanaJeyam
Copy link
Contributor

@tchiotludo Sure I can pickup this issue.

@tchiotludo
Copy link
Owner

thanks @GnanaJeyam

@GnanaJeyam
Copy link
Contributor

@tchiotludo I have a question about the schema.
Let's say the incoming schema has nested structure, do we need to recursively retrieve all the fields and do the comparison.. ? Can you share your thoughts.. ?

@tchiotludo
Copy link
Owner

In the better world, we need it!
I didn't think with the PR you done that can be a stopper for some people, so maybe the best is to validate the whole thing globally. Maybe the best option will be to try to convert and throw the native exception ?

@GnanaJeyam
Copy link
Contributor

@tchiotludo
Which means validating all the fields recursively and throw exception.. ?

@tchiotludo
Copy link
Owner

yes ...

@GnanaJeyam
Copy link
Contributor

@tchiotludo
Cool, I will proceed on this.

Between, The PR which I raised before to akhq is my first Open Source Contribution :)

@tchiotludo
Copy link
Owner

We all have a first time 😇

@GnanaJeyam
Copy link
Contributor

@tchiotludo
I added the PR.
#1293

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working topic data Kafka Topic data
Projects
Status: Done
Development

No branches or pull requests

3 participants