@@ -41,7 +41,7 @@ alloc = ["serde/alloc", "base64?/alloc", "chrono_0_4?/alloc", "hex?/alloc", "ser
41
41
# # Enables support for various types from the std library.
42
42
# # This will enable `std` support in all dependencies too.
43
43
# # The feature enabled by default and also enables `alloc`.
44
- std = [" alloc" , " serde/std" , " chrono_0_4?/clock" , " chrono_0_4?/std" , " indexmap_1?/std" , " indexmap_2?/std" , " time_0_3?/serde-well-known" , " time_0_3?/std" , " schemars_0_9?/std" ]
44
+ std = [" alloc" , " serde/std" , " chrono_0_4?/clock" , " chrono_0_4?/std" , " indexmap_1?/std" , " indexmap_2?/std" , " time_0_3?/serde-well-known" , " time_0_3?/std" , " schemars_0_9?/std" , " schemars_1?/std " ]
45
45
46
46
# ! # Documentation
47
47
# !
@@ -113,20 +113,27 @@ json = ["dep:serde_json", "alloc"]
113
113
# #
114
114
# # This pulls in [`serde_with_macros`] as a dependency.
115
115
macros = [" dep:serde_with_macros" ]
116
- # # This feature enables integration with `schemars` 0 .8.
116
+ # # This feature enables integration with `schemars` v0 .8.
117
117
# # This makes `#[derive(JsonSchema)]` pick up the correct schema for the type
118
118
# # used within `#[serde_as(as = ...)]`.
119
119
# #
120
120
# # This pulls in [`schemars` v0.8](::schemars_0_8) as a dependency. It will also implicitly enable
121
121
# # the `std` feature as `schemars` is not `#[no_std]`.
122
122
schemars_0_8 = [" dep:schemars_0_8" , " std" , " serde_with_macros?/schemars_0_8" ]
123
- # # This feature enables integration with `schemars` 0 .9
123
+ # # This feature enables integration with `schemars` v0 .9
124
124
# # This makes `#[derive(JsonSchema)]` pick up the correct schema for the type
125
125
# # used within `#[serde_as(as = ...)]`.
126
126
# #
127
127
# # This pulls in [`schemars` v0.9](::schemars_0_9) as a dependency. It will also implicitly enable
128
128
# # the `alloc` feature.
129
129
schemars_0_9 = [" dep:schemars_0_9" , " alloc" , " serde_with_macros?/schemars_0_9" , " dep:serde_json" ]
130
+ # # This feature enables integration with `schemars` v1
131
+ # # This makes `#[derive(JsonSchema)]` pick up the correct schema for the type
132
+ # # used within `#[serde_as(as = ...)]`.
133
+ # #
134
+ # # This pulls in [`schemars` v1](::schemars_1) as a dependency. It will also implicitly enable
135
+ # # the `alloc` feature.
136
+ schemars_1 = [" dep:schemars_1" , " alloc" , " serde_with_macros?/schemars_1" , " dep:serde_json" ]
130
137
# # The feature enables integration of `time` v0.3 specific conversions.
131
138
# # This includes support for the timestamp and duration types.
132
139
# #
@@ -146,6 +153,7 @@ indexmap_1 = { package = "indexmap", version = "1.8", optional = true, default-f
146
153
indexmap_2 = { package = " indexmap" , version = " 2.0" , optional = true , default-features = false , features = [" serde" ] }
147
154
schemars_0_8 = { package = " schemars" , version = " 0.8.16" , optional = true , default-features = false }
148
155
schemars_0_9 = { package = " schemars" , version = " 0.9.0" , optional = true , default-features = false }
156
+ schemars_1 = { package = " schemars" , version = " 1.0.2" , optional = true , default-features = false }
149
157
serde = { version = " 1.0.152" , default-features = false }
150
158
serde_derive = " 1.0.152"
151
159
serde_json = { version = " 1.0.45" , optional = true , default-features = false }
@@ -165,6 +173,7 @@ ron = "0.10"
165
173
rustversion = " 1.0.0"
166
174
schemars_0_8 = { package = " schemars" , version = " 0.8.16" }
167
175
schemars_0_9 = { package = " schemars" , version = " 0.9.0" }
176
+ schemars_1 = { package = " schemars" , version = " 1.0.2" }
168
177
serde = { version = " 1.0.152" , default-features = false , features = [" derive" ] }
169
178
serde_json = { version = " 1.0.25" , features = [" preserve_order" ] }
170
179
serde_test = " 1.0.124"
@@ -247,6 +256,11 @@ name = "schemars_0_9"
247
256
path = " tests/schemars_0_9/main.rs"
248
257
required-features = [" schemars_0_9" , " std" ]
249
258
259
+ [[test ]]
260
+ name = " schemars_1"
261
+ path = " tests/schemars_1/main.rs"
262
+ required-features = [" schemars_1" , " std" ]
263
+
250
264
[package .metadata .docs .rs ]
251
265
all-features = true
252
266
rustdoc-args = [
0 commit comments