oxidecomputer / oxidecomputer/dropshot
Want mechanism for distinguishing "Rust doc" from "API doc"
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 104
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 22
Description
At the moment, I believe the two are intermingled: If one wants to document a Rust type with rustdoc, that documentation is implicitly exported as part of the openapi spec. Similarly, if one wants to add openapi documentation, that must be done via Rust comments.
Although it may be a reasonable default for these two documentation targets to have the same source, it's reasonable to want:
- API docs not part of the Rust comments (i.e., they are applicable to the generated type), or
- Rust docs not part of the Open API spec (i.e., they reference other Rust types, or Rust-specific features)
Here's an example: https://github.com/oxidecomputer/omicron/pull/1348/files/b427eded0dfdc10b7c9461a38f110e9c620d0f5f#r918269331
It would be nice to have a mechanism to annotate structs and enums passed through dropshot with "OpenAPI" vs "Rustdoc" specific usage, and filter these before generating the open API spec.
Contributor guide
No contributing guide indexed for this repository
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 by reading the issue and the referenced pull request discussion, then trace how Dropshot combines Rust comments with generated OpenAPI documentation. Define the annotation behavior for structs and enums, including how Rust-only and OpenAPI-only text is identified. Done means users can keep the two documentation targets separate when generating the OpenAPI specification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, rust
- Domain
- api, documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100