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

feat(schema): added json schema to support schema on xcm messages #785

Merged
merged 4 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
schemars
  • Loading branch information
dzmitry-lahoda committed Sep 7, 2023
commit e04d2fd1f95039d3715f41a470dc2cf7dfaccf39
2 changes: 2 additions & 0 deletions bounded-collections/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ serde = { version = "1.0.101", default-features = false, optional = true, featur
codec = { version = "3.3.0", default-features = false, features = ["max-encoded-len"], package = "parity-scale-codec" }
scale-info = { version = ">=1.0, <3", features = ["derive"], default-features = false }
log = { version = "0.4.17", default-features = false }
schemars = { version = "0.8.13", default-features = true, optional = true }

[dev-dependencies]
serde_json = "1.0.41"

[features]
default = ["std"]
schema = ["schemars", "std"]
dzmitry-lahoda marked this conversation as resolved.
Show resolved Hide resolved
std = [
"log/std",
"codec/std",
Expand Down
1 change: 1 addition & 0 deletions bounded-collections/src/bounded_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ use serde::{
#[cfg_attr(feature = "serde", derive(Serialize), serde(transparent))]
#[derive(Encode, scale_info::TypeInfo)]
#[scale_info(skip_type_params(S))]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
dzmitry-lahoda marked this conversation as resolved.
Show resolved Hide resolved
pub struct BoundedVec<T, S>(pub(super) Vec<T>, #[cfg_attr(feature = "serde", serde(skip_serializing))] PhantomData<S>);

/// Create an object through truncation.
Expand Down