OpenAPITools / OpenAPITools/openapi-generator

[REQ][RUST] Allow rust generator `useBonBuilder` option for all `library` types

Open
#24,313 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

First up, thank you very much for all the work done on the specification and making this incredibly complex topic even possible to begin with

As mentioned in #24312 bon is a nice crate which "provides idiomatic partial application with optional and named parameters for functions and methods".

Since bon can apply to any function, method or struct with version 3.9 it should be possible to make use of bon for all other library types, not just reqwest-trait

Describe the solution you'd like

Extend useBonBuilder configuration option to work for all other library types like reqwest, hyper & hyper0x if applicable or possible

Describe alternatives you've considered

alternatives are the same as mentioned in #24312

Additional context

bon function examples
bon struct examples
bon method examples

Contributor guide

Open the contributing guide

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.

Research direction

Start at the Rust generator's useBonBuilder option and compare how it is handled for reqwest-trait with the other library types mentioned, including reqwest, hyper, and hyper0x. Review the relevant generated Rust library entry points and bon function, method, and struct examples; the work is done when the option consistently applies wherever supported and generated output remains valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.