v0.6.2
This commit is contained in:
parent
39dc08e34e
commit
c9d1f34243
4 changed files with 7 additions and 6 deletions
|
@ -1,11 +1,12 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [0.6.2] - TBD
|
## [0.6.2] - 2019-12-27
|
||||||
### Added:
|
### Added:
|
||||||
- Documentation website available at https://graham.cool/schemars/!
|
- Documentation website available at https://graham.cool/schemars/!
|
||||||
### Changed:
|
### Changed:
|
||||||
- Rename `derive_json_schema` to `impl_json_schema`. `derive_json_schema` is still available for backward-compatibility, but will be removed in a future version.
|
- Rename `derive_json_schema` to `impl_json_schema`. `derive_json_schema` is still available for backward-compatibility, but will be removed in a future version.
|
||||||
- Improve schema naming for deriving on remote types. A `#[serde(remote = "Duration")]` attribute is now treated similarly to `#[serde(rename = "Duration")]`.
|
- Improve schema naming for deriving on remote types. A `#[serde(remote = "Duration")]` attribute is now treated similarly to `#[serde(rename = "Duration")]`.
|
||||||
|
- Ensure root schemas do not have a `$ref` property. If necessary, wrap the `$ref` in an `allOf`.
|
||||||
|
|
||||||
## [0.6.1] - 2019-12-09
|
## [0.6.1] - 2019-12-09
|
||||||
### Fixed:
|
### Fixed:
|
||||||
|
|
|
@ -15,8 +15,8 @@ let my_schema = schema_for!(MyStruct);
|
||||||
This will create a schema that conforms to [JSON Schema Draft 7](https://json-schema.org/specification-links.html#draft-7), but this is liable to change in a future version of Schemars if support for other JSON Schema versions is added.
|
This will create a schema that conforms to [JSON Schema Draft 7](https://json-schema.org/specification-links.html#draft-7), but this is liable to change in a future version of Schemars if support for other JSON Schema versions is added.
|
||||||
|
|
||||||
If you want more control over how the schema is generated, you can use the [`gen` module](https://docs.rs/schemars/latest/schemars/gen/). There are two main types in this module:
|
If you want more control over how the schema is generated, you can use the [`gen` module](https://docs.rs/schemars/latest/schemars/gen/). There are two main types in this module:
|
||||||
* [`SchemaSettings`](https://docs.rs/schemars/0.6.1/schemars/gen/struct.SchemaSettings.html), which defines what JSON Schema features should be used when generating schemas (for example, how `Option`s should be represented).
|
* [`SchemaSettings`](https://docs.rs/schemars/latest/schemars/gen/struct.SchemaSettings.html), which defines what JSON Schema features should be used when generating schemas (for example, how `Option`s should be represented).
|
||||||
* [`SchemaGenerator`](https://docs.rs/schemars/0.6.1/schemars/gen/struct.SchemaGenerator.html), which manages the generation of a schema document.
|
* [`SchemaGenerator`](https://docs.rs/schemars/latest/schemars/gen/struct.SchemaGenerator.html), which manages the generation of a schema document.
|
||||||
|
|
||||||
See the API documentation for more info on how to use those types for custom schema generation.
|
See the API documentation for more info on how to use those types for custom schema generation.
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ name = "schemars"
|
||||||
description = "Generate JSON Schemas from Rust code"
|
description = "Generate JSON Schemas from Rust code"
|
||||||
homepage = "https://graham.cool/schemars/"
|
homepage = "https://graham.cool/schemars/"
|
||||||
repository = "https://github.com/GREsau/schemars"
|
repository = "https://github.com/GREsau/schemars"
|
||||||
version = "0.6.1"
|
version = "0.6.2"
|
||||||
authors = ["Graham Esau <gesau@hotmail.co.uk>"]
|
authors = ["Graham Esau <gesau@hotmail.co.uk>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
@ -13,7 +13,7 @@ categories = ["encoding"]
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
schemars_derive = { version = "=0.6.1", path = "../schemars_derive" }
|
schemars_derive = { version = "=0.6.2", path = "../schemars_derive" }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
chrono = { version = "0.4", default-features = false, optional = true }
|
chrono = { version = "0.4", default-features = false, optional = true }
|
||||||
|
|
|
@ -3,7 +3,7 @@ name = "schemars_derive"
|
||||||
description = "Macros for #[derive(JsonSchema)], for use with schemars"
|
description = "Macros for #[derive(JsonSchema)], for use with schemars"
|
||||||
homepage = "https://graham.cool/schemars/"
|
homepage = "https://graham.cool/schemars/"
|
||||||
repository = "https://github.com/GREsau/schemars"
|
repository = "https://github.com/GREsau/schemars"
|
||||||
version = "0.6.1"
|
version = "0.6.2"
|
||||||
authors = ["Graham Esau <gesau@hotmail.co.uk>"]
|
authors = ["Graham Esau <gesau@hotmail.co.uk>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue