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

Add property additional-properties-as-attribute configuration #504

Merged
merged 10 commits into from
Oct 3, 2023
Merged

Add property additional-properties-as-attribute configuration #504

merged 10 commits into from
Oct 3, 2023

Conversation

mcruzdev
Copy link
Member

@mcruzdev mcruzdev commented Sep 29, 2023

Fixes: #442

When Jackson try to serialize/deserialize using a class that inherit of HashMap, there are some issues.

On deserialization throws MismatchInputException and on serialization does not get plain fields.

Please make sure that your PR meets the following requirements:

  • You have read the contributors guide
  • Your code is properly formatted according to our code style
  • Pull Request title contains the target branch if not targeting main: [0.9.x] Subject
  • Pull Request contains link to the issue
  • Pull Request contains link to any dependent or related Pull Request
  • Pull Request contains description of the issue
  • Pull Request does not include fixes for issues other than the main ticket
How to backport a pull request to a different branch?

In order to automatically create a backporting pull request please add one or more labels having the following format backport-<branch-name>, where <branch-name> is the name of the branch where the pull request must be backported to (e.g., backport-quarkus2 to backport the original PR to the quarkus2 branch).

NOTE: backporting is an action aiming to move a change (usually a commit) from a branch (usually the main one) to another one, which is generally referring to a still maintained release branch. Keeping it simple: it is about to move a specific change or a set of them from one branch to another.

Once the original pull request is successfully merged, the automated action will create one backporting pull request per each label (with the previous format) that has been added.

If something goes wrong, the author will be notified and at this point a manual backporting is needed.

NOTE: this automated backporting is triggered whenever a pull request on main branch is labeled or closed, but both conditions must be satisfied to get the new PR created.

@mcruzdev mcruzdev changed the title feat: add property additional-properties-as-attribute Add property additional-properties-as-attribute configuration Sep 30, 2023
@mcruzdev mcruzdev marked this pull request as ready for review September 30, 2023 00:51
@mcruzdev
Copy link
Member Author

mcruzdev commented Sep 30, 2023

Hi @ricardozanini, @hbelmiro, can you review this pull request?

Edit: I forgot the documentation, could I add the documentation in /docs/*?

@hbelmiro
Copy link
Contributor

Edit: I forgot the documentation, could I add the documentation in /docs/*?

@mcruzdev Yes, and add a link to that in README.md, please.

Copy link
Contributor

@hbelmiro hbelmiro left a comment

Choose a reason for hiding this comment

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

Thank you @mcruzdev. Looks pretty good.
I left two comments and I'll wait for the docs.

@mcruzdev
Copy link
Member Author

Thank you @mcruzdev. Looks pretty good. I left two comments and I'll wait for the docs.

Hi, I updated the .qute file and added the docs. I got as example this open pull request #493.

@hbelmiro
Copy link
Contributor

hbelmiro commented Oct 3, 2023

Just waiting for @ayhanap's validation before merging.

@hbelmiro hbelmiro merged commit 0afd1ee into quarkiverse:main Oct 3, 2023
14 checks passed
github-actions bot pushed a commit that referenced this pull request Oct 3, 2023
* feat: add property additional-properties-as-attribute

* refactor: format the code with mvn verify

* feat: create pojoAdditionalProperties.qute file

* test: add integration test

* test: update tests

* test: add more test to make sure the issue solution

* refactor: use FQN and add docs

* refactor(test): add instanceOf assertion

* refactor: format code
hbelmiro added a commit that referenced this pull request Oct 3, 2023
…ion (#512)

* Add property additional-properties-as-attribute configuration  (#504)

* feat: add property additional-properties-as-attribute

* refactor: format the code with mvn verify

* feat: create pojoAdditionalProperties.qute file

* test: add integration test

* test: update tests

* test: add more test to make sure the issue solution

* refactor: use FQN and add docs

* refactor(test): add instanceOf assertion

* refactor: format code

* Replaced jakarta with javax
Fixed version

---------

Co-authored-by: Matheus Cruz <[email protected]>
Co-authored-by: Helber Belmiro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spec with schema having additionalProperties: true generates model extending HashMap
3 participants