Skip to content

Update the uuid kinds to emit a JSON Schema that includes the x-rust-type extension - #5742

Closed
ahl wants to merge 1 commit into
mainfrom
uuid-json
Closed

ahl wants to merge 1 commit into
mainfrom
uuid-json

Conversation

@ahl

@ahl ahl commented May 11, 2024

Copy link
Copy Markdown
Contributor

Unfortunately this doesn't yet have a visible change, but I thought it would be useful to break things up into smaller pieces. This will have visible changes after oxidecomputer/newtype-uuid#47 and become useful after oxidecomputer/typify#584.

@ahl
ahl requested a review from sunshowers May 11, 2024 06:04
Comment thread uuid-kinds/Cargo.toml
default = ["std"]
serde = ["newtype-uuid/serde"]
schemars08 = ["newtype-uuid/schemars08", "schemars"]
schemars08 = ["newtype-uuid/schemars08", "dep:schemars", "dep:serde_json"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch re using dep:, missed that somehow.

Comment thread uuid-kinds/src/lib.rs
Comment on lines +23 to +24
#[cfg(feature = "schemars08")]
impl schemars::JsonSchema for [< $kind Kind >]{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah this is about what I expected -- let's chat today about seeing how we can get this into newtype-uuid instead.

@ahl ahl closed this Oct 11, 2026
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.

2 participants