From 8f6086ba8cbac188199b8625e9174bada4fd5fc4 Mon Sep 17 00:00:00 2001 From: Sean Klein Date: Fri, 23 May 2025 13:50:02 -0700 Subject: [PATCH 1/2] Update openapi doc comments to work around rustfmt bug --- nexus/types/src/external_api/headers.rs | 8 ++------ openapi/nexus-internal.json | 2 +- openapi/nexus.json | 2 +- openapi/sled-agent.json | 2 +- sled-agent/api/src/lib.rs | 8 ++------ 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/nexus/types/src/external_api/headers.rs b/nexus/types/src/external_api/headers.rs index 58cf8e854e..e928e8f5c6 100644 --- a/nexus/types/src/external_api/headers.rs +++ b/nexus/types/src/external_api/headers.rs @@ -9,12 +9,8 @@ use serde::Serialize; /// Range request headers #[derive(Debug, Deserialize, Serialize, JsonSchema)] pub struct RangeRequest { - /// A request to access a portion of the resource, such as: + /// A request to access a portion of the resource, such as `bytes=0-499` /// - /// ```text - /// bytes=0-499 - /// ``` - /// - /// + /// See: pub range: Option, } diff --git a/openapi/nexus-internal.json b/openapi/nexus-internal.json index ef774e61e7..4b373c9dff 100644 --- a/openapi/nexus-internal.json +++ b/openapi/nexus-internal.json @@ -894,7 +894,7 @@ { "in": "header", "name": "range", - "description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", "schema": { "type": "string" } diff --git a/openapi/nexus.json b/openapi/nexus.json index c8179afa72..dd5eab31b2 100644 --- a/openapi/nexus.json +++ b/openapi/nexus.json @@ -466,7 +466,7 @@ { "in": "header", "name": "range", - "description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", "schema": { "type": "string" } diff --git a/openapi/sled-agent.json b/openapi/sled-agent.json index 639356e192..65133c41e1 100644 --- a/openapi/sled-agent.json +++ b/openapi/sled-agent.json @@ -1126,7 +1126,7 @@ { "in": "header", "name": "range", - "description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", "schema": { "type": "string" } diff --git a/sled-agent/api/src/lib.rs b/sled-agent/api/src/lib.rs index a3510309a3..608e1f5b89 100644 --- a/sled-agent/api/src/lib.rs +++ b/sled-agent/api/src/lib.rs @@ -815,13 +815,9 @@ pub struct SupportBundleMetadata { /// Range request headers #[derive(Debug, Deserialize, Serialize, JsonSchema)] pub struct RangeRequestHeaders { - /// A request to access a portion of the resource, such as: + /// A request to access a portion of the resource, such as `bytes=0-499` /// - /// ```text - /// bytes=0-499 - /// ``` - /// - /// + /// See: pub range: Option, } From 25a9404322a0c60ceb440f9adc6913980f1aec4a Mon Sep 17 00:00:00 2001 From: Sean Klein Date: Tue, 27 May 2025 08:22:12 -0700 Subject: [PATCH 2/2] openapi --- openapi/nexus-internal.json | 8 ++++---- openapi/nexus.json | 8 ++++---- openapi/sled-agent.json | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/openapi/nexus-internal.json b/openapi/nexus-internal.json index 279b94f279..7e6a4e7acd 100644 --- a/openapi/nexus-internal.json +++ b/openapi/nexus-internal.json @@ -928,7 +928,7 @@ { "in": "header", "name": "range", - "description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", "schema": { "type": "string" } @@ -964,7 +964,7 @@ { "in": "header", "name": "range", - "description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", "schema": { "type": "string" } @@ -1007,7 +1007,7 @@ { "in": "header", "name": "range", - "description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", "schema": { "type": "string" } @@ -1052,7 +1052,7 @@ { "in": "header", "name": "range", - "description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", "schema": { "type": "string" } diff --git a/openapi/nexus.json b/openapi/nexus.json index b5fd2e0cc9..76f2e44f6c 100644 --- a/openapi/nexus.json +++ b/openapi/nexus.json @@ -503,7 +503,7 @@ { "in": "header", "name": "range", - "description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", "schema": { "type": "string" } @@ -542,7 +542,7 @@ { "in": "header", "name": "range", - "description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", "schema": { "type": "string" } @@ -588,7 +588,7 @@ { "in": "header", "name": "range", - "description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", "schema": { "type": "string" } @@ -636,7 +636,7 @@ { "in": "header", "name": "range", - "description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", "schema": { "type": "string" } diff --git a/openapi/sled-agent.json b/openapi/sled-agent.json index eb8d4e5b74..c04084e07f 100644 --- a/openapi/sled-agent.json +++ b/openapi/sled-agent.json @@ -1177,7 +1177,7 @@ { "in": "header", "name": "range", - "description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", "schema": { "type": "string" } @@ -1230,7 +1230,7 @@ { "in": "header", "name": "range", - "description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", "schema": { "type": "string" } @@ -1290,7 +1290,7 @@ { "in": "header", "name": "range", - "description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", "schema": { "type": "string" } @@ -1352,7 +1352,7 @@ { "in": "header", "name": "range", - "description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", "schema": { "type": "string" } @@ -1403,7 +1403,7 @@ { "in": "header", "name": "range", - "description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n", + "description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: ", "schema": { "type": "string" }