Skip to content

Conversation

@ahl
Copy link
Collaborator

@ahl ahl commented May 16, 2025

No description provided.

Copy link
Contributor

@david-crespo david-crespo left a comment

Choose a reason for hiding this comment

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

seems good to me

@ahl
Copy link
Collaborator Author

ahl commented May 17, 2025

Want to see if this works for @smklein before merging (and cutting another release)

@smklein
Copy link
Contributor

smklein commented May 19, 2025

I updated Cargo.toml to use this branch in my PR (oxidecomputer/omicron#8183), then regenerated openapi specs.

This resulted in the following diff:

diff --git a/openapi/sled-agent.json b/openapi/sled-agent.json
index 2798c2846..1156332a1 100644
--- a/openapi/sled-agent.json
+++ b/openapi/sled-agent.json
@@ -1128,7 +1128,6 @@
             "name": "range",
             "description": "A request to access a portion of the resource, such as:\n\n``` bytes=0-499 ```\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Range",
             "schema": {
-              "nullable": true,
               "type": "string"
             }
           },

(I'm sorta assuming that "required": false is the default here)

Anyway, this compiles, I can built the sled agent client, and I'm seeing an Option<&str> as a new argument, for this header.

TL;DR: So far, appears working-as-intended

@ahl
Copy link
Collaborator Author

ahl commented May 19, 2025

(I'm sorta assuming that "required": false is the default here)

Correct per the OpenAPI docs for required:

Determines whether this parameter is mandatory. If the parameter location is "path", this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be included and its default value is false.

Copy link
Contributor

@smklein smklein left a comment

Choose a reason for hiding this comment

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

This PR is working for me in oxidecomputer/omicron#8183 ; I'm depending on it there to make range requests work

@ahl ahl merged commit d6b2740 into main May 21, 2025
11 checks passed
@ahl ahl deleted the header-null branch May 21, 2025 17:50
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