[package] name = "schemars" description = "Generate JSON Schemas from Rust code" homepage = "https://graham.cool/schemars/" repository = "https://github.com/GREsau/schemars" version = "1.0.0-alpha.15" authors = ["Graham Esau "] edition = "2021" license = "MIT" readme = "README.md" keywords = ["rust", "json-schema", "serde"] categories = ["encoding", "no-std"] rust-version = "1.65" [dependencies] schemars_derive = { version = "=1.0.0-alpha.15", optional = true, path = "../schemars_derive" } serde = { version = "1.0", default-features = false, features = ["alloc"]} serde_json = { version = "1.0.127", default-features = false, features = ["alloc"] } dyn-clone = "1.0" ref-cast = "1.0.22" # optional dependencies arrayvec07 = { version = "0.7", default-features = false, optional = true, package = "arrayvec" } bigdecimal04 = { version = "0.4", default-features = false, optional = true, package = "bigdecimal" } bytes1 = { version = "1.0", default-features = false, optional = true, package = "bytes" } chrono04 = { version = "0.4", default-features = false, optional = true, package = "chrono" } either1 = { version = "1.3", default-features = false, optional = true, package = "either" } enumset1 = { version = "1.0", default-features = false, optional = true, package = "enumset" } indexmap2 = { version = "2.0", default-features = false, optional = true, package = "indexmap" } rust_decimal1 = { version = "1", default-features = false, optional = true, package = "rust_decimal"} semver1 = { version = "1.0.9", default-features = false, optional = true, package = "semver" } smallvec1 = { version = "1.0", default-features = false, optional = true, package = "smallvec" } smol_str02 = { version = "0.2.1", default-features = false, optional = true, package = "smol_str" } url2 = { version = "2.0", default-features = false, optional = true, package = "url" } uuid1 = { version = "1.0", default-features = false, optional = true, package = "uuid" } [dev-dependencies] pretty_assertions = "1.2.1" trybuild = "1.0" serde = { version = "1.0", features = ["derive"] } [features] default = ["derive", "std"] # Provide impls for common standard library types like `HashMap`. # Requires a dependency on the Rust standard library. std = [] # Provide `derive(JsonSchema)` macro. derive = ["schemars_derive"] # Preserves order of properties inserted into a `Schema`. # When deriving `JsonSchema`, this ensures that the `properties` entires match # the order of the fields in the struct definition. preserve_order = ["serde_json/preserve_order"] # Implements `JsonSchema` on `serde_json::value::RawValue` raw_value = ["serde_json/raw_value"] # For internal/CI use only _ui_test = [] [[test]] name = "std_time" required-features = ["std"] [[test]] name = "ffi" required-features = ["std"] [[test]] name = "ui" required-features = ["_ui_test"] [[test]] name = "chrono" required-features = ["chrono04"] [[test]] name = "indexmap" required-features = ["indexmap2"] [[test]] name = "either" required-features = ["either1"] [[test]] name = "uuid" required-features = ["uuid1"] [[test]] name = "smallvec" required-features = ["smallvec1"] [[test]] name = "bytes" required-features = ["bytes1"] [[test]] name = "arrayvec" required-features = ["arrayvec07"] [[test]] name = "url" required-features = ["url2"] [[test]] name = "enumset" required-features = ["enumset1"] [[test]] name = "smol_str" required-features = ["smol_str02"] [[test]] name = "semver" required-features = ["semver1"] [[test]] name = "decimal" required-features = ["rust_decimal1", "bigdecimal04"] [package.metadata.docs.rs] all-features = true rustdoc-args = ["--extend-css", "docs-rs-custom.css"]