You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,29 @@
1
1
# Changelog
2
2
3
+
## [1.1.0] - 2025-11-05
4
+
5
+
### Added
6
+
7
+
- Public functions that have no side-effects are now marked with [`#[must_use]`](https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-must_use-attribute) so that they report a lint warning when the returned value is unused, as this likely indicates a mistake.
8
+
9
+
### Fixed
10
+
11
+
- Improve accuracy of schemas for flattened enums, in particular: unit variants of externally-tagged enums, and enums wrapped in `Option<>`. (https://github.com/GREsau/schemars/issues/464 / https://github.com/GREsau/schemars/pull/483)
12
+
13
+
## [1.0.5] - 2025-11-02
14
+
15
+
### Fixed
16
+
17
+
- Fix `schema.pointer_mut()` to resolve URI fragment identifiers like `#/$defs/foo`, matching current behaviour of `schema.pointer()` (https://github.com/GREsau/schemars/issues/478 / https://github.com/GREsau/schemars/pull/479)
18
+
19
+
## [1.0.4] - 2025-07-06
20
+
21
+
### Fixed
22
+
23
+
- Fix `JsonSchema` impl on [atomic](https://doc.rust-lang.org/std/sync/atomic/) types being ignored on non-nightly compilers due to a buggy `cfg` check (https://github.com/GREsau/schemars/issues/453)
24
+
- Fix compatibility with minimal dependency versions, e.g. old(-ish) versions of `syn` (https://github.com/GREsau/schemars/issues/450)
25
+
- Fix derive for empty tuple variants (https://github.com/GREsau/schemars/issues/455)
Where-clause for the JsonSchema impl. This replaces any trait bounds inferred by schemars. Schemars does **not** use trait bounds from `#[serde(bound)]` attributes.
218
+
Where-clause for the `JsonSchema` impl. This replaces any trait bounds inferred by schemars. Schemars does **not** use trait bounds from `#[serde(bound)]` attributes.
Copy file name to clipboardExpand all lines: docs/_includes/deriving.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Deriving JsonSchema
1
+
# Deriving `JsonSchema`
2
2
3
3
The most important trait in Schemars is `JsonSchema`, and the most important function of that trait is `json_schema(...)` which returns a JSON schema describing the type. Implementing this manually on many types would be slow and error-prone, so Schemars includes a derive macro which can implement that trait for you. Any derived implementation of `JsonSchema` should create a schema that describes the JSON representation of the type if it were to be serialized by serde_json.
Copy file name to clipboardExpand all lines: docs/examples/3-schemars_attrs.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ nav_order: 3
5
5
summary: "Deriving JsonSchema on types that use #[schemars] attributes to customise serialization behaviour."
6
6
---
7
7
8
-
# Using Serde Attributes
8
+
# Using Schemars Attributes
9
9
10
10
`#[serde(...)]` attributes can be overriden (or replaced) with `#[schemars(...)]` attributes, which behave identically. You may find this useful if you want to change the generated schema without affecting Serde's behaviour, or if you're just not using Serde.
0 commit comments