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

Enable mapper feature: accept case-insensitive enums #3707

Conversation

JohnNiang
Copy link
Member

What type of PR is this?

/kind improvement
/area core

What this PR does / why we need it:

After enabling this mapper feature, we could pass a enum value with any case in request body(JSON format).

See https://github.com/FasterXML/jackson-databind/blob/39fdb63607a0e7a6dbf9d6be84fe7e380e661dcb/src/test/java/com/fasterxml/jackson/databind/deser/enums/EnumDeserializationTest.java#L22 for more.

Does this PR introduce a user-facing change?

None

@f2c-ci-robot f2c-ci-robot bot added kind/improvement Categorizes issue or PR as related to a improvement. release-note-none Denotes a PR that doesn't merit a release note. labels Apr 7, 2023
@f2c-ci-robot f2c-ci-robot bot requested review from lan-yonghui and ruibaby April 7, 2023 07:54
@f2c-ci-robot f2c-ci-robot bot added the area/core Issues or PRs related to the Halo Core label Apr 7, 2023
@codecov
Copy link

codecov bot commented Apr 7, 2023

Codecov Report

Merging #3707 (4b6fb2f) into main (dea87b2) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##               main    #3707   +/-   ##
=========================================
  Coverage     59.95%   59.96%           
  Complexity     2211     2211           
=========================================
  Files           333      333           
  Lines         11343    11344    +1     
  Branches        834      834           
=========================================
+ Hits           6801     6802    +1     
  Misses         4129     4129           
  Partials        413      413           
Impacted Files Coverage Δ
...in/java/run/halo/app/config/HaloConfiguration.java 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@guqing guqing left a comment

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Apr 7, 2023
Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

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

/approve

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Apr 9, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 9, 2023
@f2c-ci-robot f2c-ci-robot bot merged commit 45313a5 into halo-dev:main Apr 9, 2023
ruibaby pushed a commit to ruibaby/halo that referenced this pull request Apr 10, 2023
#### What type of PR is this?

/kind improvement
/area core

#### What this PR does / why we need it:

After enabling this mapper feature, we could pass a enum value with any case in request body(JSON format).

See https://github.com/FasterXML/jackson-databind/blob/39fdb63607a0e7a6dbf9d6be84fe7e380e661dcb/src/test/java/com/fasterxml/jackson/databind/deser/enums/EnumDeserializationTest.java#L22 for more.

#### Does this PR introduce a user-facing change?

```release-note
None
```
@JohnNiang JohnNiang deleted the feat/enable-accept-case-insensitive-enums branch April 10, 2023 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants