[REQ][RUST] Update template generated version of bon for option `useBonBuilder`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
Research direction
Start in the Rust generator and its templates or configuration for useBonBuilder; search for the generated bon version and inspect how dependency versions are tested. Update the pin or version selection, then run the Rust generator tests or a sample generation to verify that useBonBuilder produces the current intended bon dependency.
Written by the indexing model from the issue text.
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
The rust generator config allow for optional use of the bon crate
This crate "provides idiomatic partial application with optional and named parameters for functions and methods".
The current version of bon generated is version 2.3.0 which is 2 years old with bon having made many improvements in the meantime.
Describe the solution you'd like
Update or remove pinning to current outdated version of bon
Describe alternatives you've considered
There also is the useSingleRequestParameter which groups all parameters into a single struct.
This is another popular approach to dealing with rusts explicit nature of having to supply ALL parameters even if they are supposed to be optionally unset.
With current rust the approach would be:
struct someParams {
some1: Option<String>,
some2: Option<String>,
some3: Option<String>,
some4: Option<String>,
some5: Option<String>,
some6: Option<String>,
some7: Option<String>,
some8: Option<String>,
}
let tmp = someFn(someParams {some1: "smth", some5: "smth", ..Default::default()})
However this also does not work as the someParams struct generated by OpenAPI does not derive from std::Default yet either.
Additional context
bon function examples
bon struct examples
bon method examples
std::Default
default example1
default example2
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 103
Contributor guide
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 OpenAPITools/openapi-generator
-
Issue: Bug
Difficulty 1/5 Under an hour Newbie friendliness 91/100
OpenAPITools/openapi-generator#24978 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
OpenAPITools/openapi-generator#24975 ·
-
Issue: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
OpenAPITools/openapi-generator#24859 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
OpenAPITools/openapi-generator#24852 · 1 comment ·
-
[BUG][KOTLIN] Fails to compile after updating to 7.25.0 with useJackson3=false useSpringBoot4=true OpenIssue: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
OpenAPITools/openapi-generator#24842 · 1 comment ·
All issues in OpenAPITools/openapi-generator
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
1.0.0-alpha2 Type/Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wso2/dpdp-accelerator#272 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
apache/rocketmq-dashboard#4860 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·