Introduce custom formatter for json property names
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start in src/main/java/io/vertx/codegen/generators/dataobjecthelper/DataObjectHelperGen.java around the referenced formatter-selection point, then inspect the existing loadJsonMappers classloader handling. Define how a formatter is loaded from the compilation classpath and verify the two-project scenario described in the issue. Done means a @DataObject can map endpointConfigs to endpoints for JSON conversion in both directions.
Written by the indexing model from the issue text.
Description
Describe the feature
Introduce custom formatter for json property names
Use cases
I have a POJO which is annotated with @DataObject (vertx-codegen) to convert it into JSON and back. This POJO has an attribute called "endpointConfigs", but in the JSON I want to call it "endpoints". I saw that @DataObject has a property called "jsonPropertyNameFormatter", which I think is exactly what I need.
Contribution
I would try to implement this feature. @vietj gave me already some entry points in discord, which I will add to this description then we have everything on one page.
Place to choose the formatter [1].
Discord messages
- ideally we should be able to support loading this class from a classloader
- I think the most difficult issue is using the correct classloader for this
- Introducing a new classloader and configure the classpath in codegen config is the wrong direction, because it adds more complexcity.
- if you look at loadJsonMappers we do use getClass().getClassLoader() so perhaps it should simply work with this
- you need two projects one jar with the Case one project that use it from compilation classpath (I hope I can solve it more elegant with just in time compilation)
- Dominant language
- Java
- Stars
- 111
- Forks
- 88
- PR merge metrics
- No merged PRs in 30d
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eclipse-vertx/vertx-codegen
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 15/100
eclipse-vertx/vertx-codegen#361 ·
-
help wanted
Difficulty 4/5 3-5 days Newbie friendliness 35/100
eclipse-vertx/vertx-codegen#340 · 11 comments · 2 reactions ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
eclipse-vertx/vertx-codegen#320 · 4 comments ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
eclipse-vertx/vertx-codegen#319 · 1 comment · 1 reaction ·
-
JPMS json mapperOpenbug help wanted
Difficulty 4/5 3-5 days Newbie friendliness 25/100
eclipse-vertx/vertx-codegen#315 ·
All issues in eclipse-vertx/vertx-codegen
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openhab/openhab-core#5847 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
apache/parquet-java#3820 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
beehive-lab/jllm#187 ·