oxidecomputer / oxidecomputer/omicron
Capitalization seems wonky for templatized types in openapi spec
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
For example, see:
In the openapi spec, this becomes:
Even though it should probably be BinRangeDouble.
It seems like the line:
#[schemars(rename = "BinRange{T}")]
Is the crux of this - AFAICT, this is part of schemars, which documetns that {T} performs a replacement, but it is unclear how to get the right PascalCase capitalization here.
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
Start with the templatized type and #[schemars(rename = "BinRange{T}")] in oximeter/oximeter/src/histogram.rs, then compare its generated representation at openapi/nexus-internal.json. Read the linked schemars rename documentation to determine how the replacement affects capitalization. Done means the generated OpenAPI name uses the expected PascalCase form, such as BinRangeDouble.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, rust
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100