Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement schemars::JsonSchema for new types. #279

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gibbz00
Copy link

@gibbz00 gibbz00 commented Jun 28, 2024

Placed behind a schemars feature flag.

Copy link
Owner

@ramosbugs ramosbugs left a comment

Choose a reason for hiding this comment

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

I wasn't familiar with schemars, but it seems popular enough that this is worth merging. Still, I wonder if it's worth waiting for their 1.0 release (GREsau/schemars#290) since bumping the schemars dependency would be a breaking change. Though, as long as schemars 1.0 is API-compatible (for the subset of APIs used by this crate), we could also just change Cargo.toml to schemars = { version = "0.8, 1", optional = true } once 1.0 is released without introducing a breaking change. Thoughts?

src/types.rs Show resolved Hide resolved
src/types.rs Outdated Show resolved Hide resolved
src/types.rs Outdated Show resolved Hide resolved
src/types.rs Outdated Show resolved Hide resolved
src/types.rs Show resolved Hide resolved
Placed behind a `schemars` feature flag.
@gibbz00
Copy link
Author

gibbz00 commented Aug 5, 2024

Hey again,

Apologies for the late reply, got a lot going on at work...

Still, I wonder if it's worth waiting for their 1.0 release (GREsau/schemars#290) since bumping the schemars dependency would be a breaking change.

Good point. I think that the safest and easiest way forward it to simply wait for the 1.0 release. It seems to be just around the corner, and I'm not in too much of a hurry 😊

@gibbz00 gibbz00 changed the title Implement schemars::JsonSchema for non-secret new types. Implement schemars::JsonSchema for new types. Aug 5, 2024
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