-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Newlines removed in move from doc comment to OpenAPI description
#402
Comments
Tricky! It's hard to distinguish, say, a line-wrapped paragraph from intentional newlines. In this particular case, it seems like the comments are intended for the local crate and aren't appropriate to include in the OpenAPI document at all. |
Yeah, this particular comment predates using a generator, and wasn't originally intended to be part of the OpenAPI spec. I think this one deserves either a wrapper type with a more clear and language-agnostic docstring, or moving most of the existing string to a private comment, e.g., |
Fine with me, seems like most of the fix here is to fix the comment itself. Maybe a dumb question, but why do we need to process the newlines in the doc comments at all? dropshot/dropshot_endpoint/src/lib.rs Lines 523 to 549 in e75844e
|
Seems like double newlines are being kept but single newlines are being turned into spaces.
https://github.com/oxidecomputer/omicron/blob/e9554ad930665e82526b784b1f12300f067298fa/oximeter/oximeter/src/histogram.rs#L201-L222
becomes
https://github.com/oxidecomputer/omicron/blob/e9554ad930665e82526b784b1f12300f067298fa/openapi/nexus.json#L8018
The text was updated successfully, but these errors were encountered: