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

JavaBeans format for lists not compliant, causes failures with spring boot 3.0.2 when validation of list is added #296

Closed
jbiscella opened this issue May 18, 2023 · 3 comments · Fixed by #313
Labels
bug Something isn't working released

Comments

@jbiscella
Copy link

Describe the bug

When generating a list, the tool adds the suffix 'List', but Java Beans validation in spring boot 3.0.2 relies on full compliance to specifications by using reflection, then the name of fields and the getters should be aligned.
Current behaviour:
field: aliases
generated as: aliasesList
getter: getAliases
compliant to JavaBeans specs: no

Safe behavious
field: aliases
generated as: aliases
getter: getAliases
compliant to JavaBeans specs: yes

How to Reproduce

In spring boot 3.*, try to generate a kafka topic model with validation of a List annotated with @NotNull.
When validation will run, an IllegalStateException will be raised

Expected behavior

The field should be generated without the 'List' suffix in compliance with JavaBeans specification.
( problem is at $$message$$ lines 42 and $$objectSchema$$ lines 24, 26,28,97,127,157,163,169 - I cannot contribute due to company policies )

@jbiscella jbiscella added the bug Something isn't working label May 18, 2023
@github-actions
Copy link

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@Tenischev
Copy link
Member

Hi @jbiscella
Thanks for the report! I will think what could be done (there was a reason to put List in the end)

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants