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

Numeric parameter is serialized as string #1653

Open
igarashitm opened this issue Nov 21, 2024 · 4 comments
Open

Numeric parameter is serialized as string #1653

igarashitm opened this issue Nov 21, 2024 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@igarashitm
Copy link
Contributor

Describe the Bug

Numeric parameter is serialized as string, observed on onException maximumRedeliveries

Steps to Reproduce the Bug or Issue

  1. Create onException
  2. Set maximumRedeliveries to 3
  3. See source code, maximumRedeliveries is double quoted

Screenshots or Videos

Screenshot From 2024-11-21 15-59-17

Screenshot From 2024-11-21 15-58-51

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 0.30.0]
@igarashitm igarashitm added the bug Something isn't working label Nov 21, 2024
@apupier
Copy link
Member

apupier commented Nov 22, 2024

Shouldn't we be able to provide a String so that we can use placeholders? In this case the issue is in the yaml schema.

@igarashitm
Copy link
Contributor Author

I don't think we want all the properties to be String in the schema itself. No matter how it's brought including with property placeholder, if at runtime it's finally a number, then schema should declare it's a number. The property placeholder is some magic beyond that I would say.

@lordrip lordrip added this to the 2.4.0 milestone Nov 22, 2024
@lordrip
Copy link
Member

lordrip commented Nov 22, 2024

Considering the purpose of the schema is to express to the user what can be written there, I believe the schema should allow for string types there. At the same time, considering that we can use placeholders almost everywhere, it's very likely all properties will be string 😅.

I want to propose that when writing a number over a number field, make Kaoto understand it and write as-is, otherwise, write the string.

@lordrip
Copy link
Member

lordrip commented Nov 26, 2024

For now we're going with serializing a number when is a number, in case of a placeholder, we serialize string.

@lordrip lordrip moved this from New to Backlog in Kanban Board Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

3 participants