Skip to content

Conversation

@jmcarp
Copy link
Contributor

@jmcarp jmcarp commented Dec 23, 2025

At the moment, some docstrings in the generated docs lack newlines, and string together multiple sentences without punctuation. For example, the provisioned field in the silo_utilization_list method is a bit garbled: https://docs.oxide.computer/api/silo_utilization_list.

Accounts for resources allocated by in silos like CPU or memory for running
instances and storage for disks and snapshots Note that CPU and memory
resources associated with a stopped instances are not counted here

This patch adds the missing newlines and punctuation to make this docstring readable. Note that these changes won't show up in the generated docs until we cut a new release.

Note: if this change makes sense, I'll also ask Claude to review all docstrings in this crate for similar issues.

cc @david-crespo in case this is relevant to your interests (docs style guide, making Claude do things).

At the moment, some docstrings in the generated docs lack newlines, and string
together multiple sentences without punctuation. For example, the `provisioned`
field in the `silo_utilization_list` method is a bit garbled:
https://docs.oxide.computer/api/silo_utilization_list.

> Accounts for resources allocated by in silos like CPU or memory for running
> instances and storage for disks and snapshots Note that CPU and memory
> resources associated with a stopped instances are not counted here

This patch adds the missing newlines and punctuation to make this docstring
readable. Note that these changes won't show up in the generated docs until we
cut a new release.

Note: if this change makes sense, I'll also ask Claude to review all docstrings
in this crate for similar issues.
/// Note that CPU and memory resources associated with a stopped instances are not counted here
/// Accounts for resources allocated by in silos like CPU or memory for running instances and storage for disks and snapshots.
///
/// Note that CPU and memory resources associated with a stopped instances are not counted here.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a stopped instances

@david-crespo
Copy link
Contributor

Totally on board. You will have to regen the openapi schema with cargo xtask openapi generate. I believe these changes are considered non-semantic with respect to the schema but I don't have enough experience with the new versioning setup to know exactly what will happen here.

@jmcarp jmcarp force-pushed the jmcarp/docstring-newlines branch from 80f0aff to 151c22c Compare December 23, 2025 18:40
@jmcarp
Copy link
Contributor Author

jmcarp commented Dec 23, 2025

Ok, I had Claude make more edits, and checked in a markdown file to make these rules at least somewhat repeatable.

You will have to regen the openapi schema with cargo xtask openapi generate.

I might be misunderstanding, but I think this isn't enough. I couldn't get the xtask to update the generated docs until I added a new (fake) version in nexus/external-api/src/lib.rs. Is there a different workflow for making docs-only changes to the openapi spec?

@jmcarp jmcarp marked this pull request as ready for review December 23, 2025 18:44
@david-crespo
Copy link
Contributor

A reasonable expectation, but I think that's how it's supposed to work.

#9546
oxidecomputer/dropshot-api-manager#35

@sunshowers
Copy link
Contributor

The change in #9546 means that you'll be asked to add a new version for non-semantic changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants