Cargo Features
[dependencies]
schemars = { version = "1.2.1", default-features = false, features = ["std", "derive", "preserve_order", "raw_value", "arrayvec07", "bigdecimal04", "bytes1", "chrono04", "either1", "indexmap2", "jiff02", "rust_decimal1", "semver1", "smallvec1", "smol_str02", "smol_str03", "url2", "uuid1"] }
- default = derive, std
-
These default features are set whenever
schemarsis added withoutsomewhere in the dependency tree.default-features = false - std default
-
Provide impls for common standard library types like
HashMap<K, V>. Requires a dependency on the Rust standard library. - derive default = schemars_derive
-
Provide
derive(JsonSchema)macro. - preserve_order
-
Preserves order of properties inserted into a
Schema. When derivingJsonSchema, this ensures that thepropertiesentires match the order of the fields in the struct definition.Enables preserve_order of serde_json
- raw_value
-
Implements
JsonSchemaonserde_json::value::RawValueEnables raw_value of serde_json
Features from optional dependencies
In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.
- schemars_derive derive
- arrayvec07 implicit feature
-
Enables arrayvec
optional dependencies
- bigdecimal04 implicit feature
-
Enables bigdecimal
- bytes1 implicit feature
-
Enables bytes
bytes:
Types and traits for working with bytes
- chrono04 implicit feature
-
Enables chrono
chrono:
Date and time library for Rust
- either1 implicit feature
-
Enables either
either:
The enum
Eitherwith variantsLeftandRightis a general purpose sum type with two cases - indexmap2 implicit feature
-
Enables indexmap
indexmap:
A hash table with consistent order and fast iteration
- jiff02 implicit feature
-
Enables jiff
- rust_decimal1 implicit feature
-
Enables rust_decimal
- semver1 implicit feature
-
Enables semver
semver:
Parser and evaluator for Cargo's flavor of Semantic Versioning
- smallvec1 implicit feature
-
Enables smallvec
smallvec:
'Small vector' optimization: store up to a small number of items on the stack
- smol_str02 implicit feature
-
Enables smol_str ^0.2.1
- smol_str03 implicit feature
-
Enables smol_str
- url2 implicit feature
-
Enables url
url:
URL library for Rust, based on the WHATWG URL Standard
- uuid1 implicit feature
-
Enables uuid
uuid:
A library to generate and parse UUIDs