oxidecomputer / oxidecomputer/dropshot

Newlines removed in move from doc comment to OpenAPI `description`

Open
#402 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.2k
Forks
104
Avg merge
1d 19h
Merged PRs (30d)
22

Description

Seems like double newlines are being kept but single newlines are being turned into spaces.

/// Note that any gaps, unsorted bins, or non-finite values will result in an error.
///
/// Example
/// -------
/// ```rust
/// use oximeter::histogram::{BinRange, Histogram};

https://github.com/oxidecomputer/omicron/blob/e9554ad930665e82526b784b1f12300f067298fa/oximeter/oximeter/src/histogram.rs#L201-L222

becomes

an error.\n\nExample ------- ```rust use oximeter::histogram::{BinRange, Histogram};\n\nlet edges

https://github.com/oxidecomputer/omicron/blob/e9554ad930665e82526b784b1f12300f067298fa/openapi/nexus.json#L8018

Contributor guide

No contributing guide indexed for this repository

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

Compare the doc comment in oximeter/src/histogram.rs at the linked lines with the generated entry in openapi/nexus.json. Start by tracing how the comment becomes the OpenAPI description, then verify that single newlines remain newlines while the existing example formatting is preserved. Done means the generated description matches the source comment's line breaks.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.