Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Introduce custom formatter for json property names

Open
#335 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
devtools

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

enhancement
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)

[1] https://github.com/vert-x3/vertx-codegen/blob/730d4f707ef4eb8d6dca489614b9a5e9e0e3c182/src/main/java/io/vertx/codegen/generators/dataobjecthelper/DataObjectHelperGen.java#L349

Dominant language
Java
Stars
111
Forks
88
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-vertx/vertx-codegen

All issues in eclipse-vertx/vertx-codegen

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.