[REQ][Java] useRecords beyond Spring: shared logic and the java client

Open
#25,494 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
java
Domain
devtools

Research direction

The useRecords decision lives in SpringCodegen, and the proposal moves it into a shared helper without changing output. Read that class and the Spring useRecords samples first. Done means regenerating the samples produces no file changes, and the java client libraries are not yet touched. Wait for the maintainers' go or no-go in the thread before starting, since the scope is still being decided.

Written by the indexing model from the issue text.

Description

#10490 asks for Java models as records. useRecords for Spring is on master for 7.27.0, with allOf open in #25492. I'd like to offer the same option in the java client: restclient, webclient and native first, okhttp-gson last, one library per PR.

flowchart LR
  H["record decision in one helper"] --> S["spring: on master"]
  H --> J["java client: library by library"]

The first PR only moves that decision out of SpringCodegen, and regenerating the samples must change no file; the other Java generators never reach it. Gson is untried, and if this doesn't fit, useRecords stays Spring-only. @martin-mfg @KannaKim @Zomzog, go or no-go before I start?

Dominant language
Java
Stars
26.9k
Forks
7.8k
Avg merge
2d 23m
Merged PRs (30d)
177

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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 OpenAPITools/openapi-generator

All issues in OpenAPITools/openapi-generator

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.