OpenAPITools / OpenAPITools/openapi-generator
[BUG] rust-server doesn't seem to like examples
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Hi,
I'm using rust-server with 4.0.1.
I have a path which returns an schema defined as below:
$ref: '#/components/schemas/Alert
This schema is a test one, and is defined as:
Alert:
type: object
properties:
name:
type: string
example: "Test string"
This renders the following code in examples/client.rs
// Disabled because there's no example.
Some("ExecuteAlert") => {
let result = core.run(client.execute_alert(???));
println!("{:?} (X-Span-ID: {:?})", result, (client.context() as &Has<XSpanIdString>).get().clone());
},
Is this something which is meant to work when examples are set?
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.
Research direction
Begin with the generated examples/client.rs output from the rust-server case and the OpenAPI schema shown in the report. Reproduce using rust-server 4.0.1, then trace why the Alert property's example does not yield a usable argument; done means the generated example no longer contains ??? when examples are provided.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100