Skip to content

Commit 37a2122

Browse files
authored
Update openapi doc comments to work around rustfmt bug (#8210)
Workaround to help integrate oxidecomputer/oxide.rs#1110
1 parent 9aeff2f commit 37a2122

File tree

5 files changed

+20
-28
lines changed

5 files changed

+20
-28
lines changed

nexus/types/src/external_api/headers.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@ use serde::Serialize;
99
/// Range request headers
1010
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
1111
pub struct RangeRequest {
12-
/// A request to access a portion of the resource, such as:
12+
/// A request to access a portion of the resource, such as `bytes=0-499`
1313
///
14-
/// ```text
15-
/// bytes=0-499
16-
/// ```
17-
///
18-
/// <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>
14+
/// See: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>
1915
pub range: Option<String>,
2016
}

openapi/nexus-internal.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@
894894
{
895895
"in": "header",
896896
"name": "range",
897-
"description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n<https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
897+
"description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
898898
"schema": {
899899
"type": "string"
900900
}
@@ -928,7 +928,7 @@
928928
{
929929
"in": "header",
930930
"name": "range",
931-
"description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n<https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
931+
"description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
932932
"schema": {
933933
"type": "string"
934934
}
@@ -964,7 +964,7 @@
964964
{
965965
"in": "header",
966966
"name": "range",
967-
"description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n<https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
967+
"description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
968968
"schema": {
969969
"type": "string"
970970
}
@@ -1007,7 +1007,7 @@
10071007
{
10081008
"in": "header",
10091009
"name": "range",
1010-
"description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n<https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
1010+
"description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
10111011
"schema": {
10121012
"type": "string"
10131013
}
@@ -1052,7 +1052,7 @@
10521052
{
10531053
"in": "header",
10541054
"name": "range",
1055-
"description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n<https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
1055+
"description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
10561056
"schema": {
10571057
"type": "string"
10581058
}

openapi/nexus.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@
466466
{
467467
"in": "header",
468468
"name": "range",
469-
"description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n<https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
469+
"description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
470470
"schema": {
471471
"type": "string"
472472
}
@@ -503,7 +503,7 @@
503503
{
504504
"in": "header",
505505
"name": "range",
506-
"description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n<https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
506+
"description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
507507
"schema": {
508508
"type": "string"
509509
}
@@ -542,7 +542,7 @@
542542
{
543543
"in": "header",
544544
"name": "range",
545-
"description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n<https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
545+
"description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
546546
"schema": {
547547
"type": "string"
548548
}
@@ -588,7 +588,7 @@
588588
{
589589
"in": "header",
590590
"name": "range",
591-
"description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n<https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
591+
"description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
592592
"schema": {
593593
"type": "string"
594594
}
@@ -636,7 +636,7 @@
636636
{
637637
"in": "header",
638638
"name": "range",
639-
"description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n<https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
639+
"description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
640640
"schema": {
641641
"type": "string"
642642
}

openapi/sled-agent.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@
11261126
{
11271127
"in": "header",
11281128
"name": "range",
1129-
"description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n<https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
1129+
"description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
11301130
"schema": {
11311131
"type": "string"
11321132
}
@@ -1177,7 +1177,7 @@
11771177
{
11781178
"in": "header",
11791179
"name": "range",
1180-
"description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n<https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
1180+
"description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
11811181
"schema": {
11821182
"type": "string"
11831183
}
@@ -1230,7 +1230,7 @@
12301230
{
12311231
"in": "header",
12321232
"name": "range",
1233-
"description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n<https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
1233+
"description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
12341234
"schema": {
12351235
"type": "string"
12361236
}
@@ -1290,7 +1290,7 @@
12901290
{
12911291
"in": "header",
12921292
"name": "range",
1293-
"description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n<https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
1293+
"description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
12941294
"schema": {
12951295
"type": "string"
12961296
}
@@ -1352,7 +1352,7 @@
13521352
{
13531353
"in": "header",
13541354
"name": "range",
1355-
"description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n<https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
1355+
"description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
13561356
"schema": {
13571357
"type": "string"
13581358
}
@@ -1403,7 +1403,7 @@
14031403
{
14041404
"in": "header",
14051405
"name": "range",
1406-
"description": "A request to access a portion of the resource, such as:\n\n```text bytes=0-499 ```\n\n<https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
1406+
"description": "A request to access a portion of the resource, such as `bytes=0-499`\n\nSee: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>",
14071407
"schema": {
14081408
"type": "string"
14091409
}

sled-agent/api/src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -820,13 +820,9 @@ pub struct SupportBundleMetadata {
820820
/// Range request headers
821821
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
822822
pub struct RangeRequestHeaders {
823-
/// A request to access a portion of the resource, such as:
823+
/// A request to access a portion of the resource, such as `bytes=0-499`
824824
///
825-
/// ```text
826-
/// bytes=0-499
827-
/// ```
828-
///
829-
/// <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>
825+
/// See: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range>
830826
pub range: Option<String>,
831827
}
832828

0 commit comments

Comments
 (0)