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

Template Generation Should Follow Jackson Conventions #230

Open
robmoffat opened this issue Sep 30, 2021 · 2 comments
Open

Template Generation Should Follow Jackson Conventions #230

robmoffat opened this issue Sep 30, 2021 · 2 comments
Labels

Comments

@robmoffat
Copy link
Member

Template generation currently inspects the fields on an object. It would make more sense if it used Jackson's approach of inspecting getters / setters.

Also ideally, if the user provides the annotations to inspect fields instead / ignore fields / whatever, then we should match this on the template too.

Reason is, then we can do a better job of mapping the form response to the JSON object.

@robmoffat robmoffat self-assigned this Oct 6, 2021
@robmoffat
Copy link
Member Author

So, the reason for doing this is that our templates would then match up with the JSON - at the moment, by adding Jackson annotations to fields, it would be possible for the JSON to be different to the template. Also, JSON is based on getters, whereas the template is based on the bean fields.

To make this change, we would need to modify AbstractComplexTypeConverter.getFields method, so that it called off to Jackson to get a list of the fields we needed.

@robmoffat robmoffat removed their assignment Feb 1, 2022
@robmoffat robmoffat added good first issue Good for newcomers spring-bot and removed chat-workflow labels Mar 30, 2022
@robmoffat
Copy link
Member Author

This is a good first issue if you are quite familiar with how Jackson works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant