Commit graph

519 commits

Author SHA1 Message Date
Łukasz Biel
cb392d1829 Cover serde_json RawValue type by schemars 2023-08-28 12:29:36 +01:00
Graham Esau
5836afbd64 Update docs and changelog 2023-08-27 23:01:12 +01:00
David Knaack
aeb989486e Add support for indexmap v2 2023-08-27 23:01:12 +01:00
Graham Esau
5dbfa49c5e Update MSRV to 1.60 2023-08-27 23:01:12 +01:00
Graham Esau
37478d764e
Support types with const generics (#239)
Co-authored-by: Spencer Sharkey <spsharkey@tesla.com>
2023-08-27 20:50:20 +01:00
Graham Esau
0303f0334e
add support for semver crate (#238)
---------

Co-authored-by: Omar Tawfik <15987992+OmarTawfik@users.noreply.github.com>
2023-08-27 20:00:36 +01:00
Graham Esau
1ac9d19a24 Don't duplicate entire README in doc comment 2023-08-20 18:14:04 +01:00
Graham Esau
3d56977ecf Update to rust 2021 edition 2023-08-20 18:14:04 +01:00
Graham Esau
072730f6f6 Resolve clippy warnings 2023-08-20 18:14:04 +01:00
Graham Esau
e0495c0c87 Update MSRV to 1.56 2023-08-20 18:14:04 +01:00
Graham Esau
386e3d7f5a v0.8.12 2023-02-26 21:00:48 +00:00
Simon Warta
9dc816fafc Set a reasonable min version for serde_json
serde_json 1.0.25 brings in the json! macro that is used here
(https://github.com/serde-rs/json/releases/tag/v1.0.25)
2023-02-26 20:09:18 +00:00
Graham Esau
824993ca76 Apply clippy fixes 2023-02-26 19:59:17 +00:00
Graham Esau
39bae201eb Run cargo fmt 2023-02-26 19:47:10 +00:00
Gleb Pomykalov
587176fe9f
add optional smol_str support (#72)
Co-authored-by: Graham Esau <gesau@hotmail.co.uk>
2023-02-26 19:42:16 +00:00
Graham Esau
73715c10e0 Fix GH actions badge 2023-02-26 19:10:21 +00:00
Graham Esau
b13fcd15cf Fix rustc 1.45 CI 2023-02-26 19:05:45 +00:00
Graham Esau
5268080b01 v0.8.11 2022-10-02 20:01:43 +01:00
Graham Esau
84c2a2bb54 Second attempt to fix rust 1.45 CI 2022-10-02 19:59:54 +01:00
Graham Esau
cf0cf2b1be Attempt to fix rust 1.45 CI 2022-10-02 19:56:06 +01:00
Graham Esau
4f14c1a74c Update docs and changelog 2022-10-02 19:46:29 +01:00
Graham Esau
c59e5b5e1c Fix test 2022-10-02 19:46:29 +01:00
Graham Esau
4754a13fb3 Ignore bound set in serde attrs 2022-10-02 19:46:29 +01:00
Graham Esau
104dccca50 Add #[schemars(bound = ...)] attribute
Based on https://github.com/GREsau/schemars/pull/162

Co-authored-by: teozkr <teo@nullable.se>
2022-10-02 19:46:29 +01:00
Randy Barlow
6ada120cd3 Fix a typo
Signed-off-by: Randy Barlow <randy.barlow@deepgram.com>
2022-10-02 19:45:46 +01:00
Graham Esau
4db6733844 Fix rendering of HTML tags in markdown docs 2022-08-14 15:35:32 +01:00
Graham Esau
b48bb2b2b3 Omit third-party crates from rust 1.45 CI 2022-08-12 16:21:11 +01:00
Graham Esau
dfa51de466 Fix rust 1.45 CI 2022-08-12 16:14:59 +01:00
Graham Esau
954f9f4c5c Fix rust 1.45 CI 2022-08-12 16:00:11 +01:00
Graham Esau
ba92234b3e Update changelog, update MSRV to 1.45 2022-08-12 15:49:59 +01:00
Adam Leventhal
76427ef384
Fix handling of attributes applied to unit variant types (#152) 2022-08-12 15:37:34 +01:00
Graham Esau
9464118c3a v0.8.10 2022-05-17 18:33:47 +01:00
Graham Esau
d93bdc43e3 Revert "Support generic default values"
This feature inadvertently introduced a breaking change (#144)

This reverts commits: feb6c4b2fe
b38a55331b.
2022-05-17 18:17:17 +01:00
Graham Esau
1610294af4 v0.8.9 2022-05-16 22:41:14 +01:00
Graham Esau
74974d3e95
Support uuid v1 and arrayvec 0.7 (#142) 2022-05-16 22:39:48 +01:00
Graham Esau
043d794e39 Fix build warnings from tests
Deriving `Debug` is no longer enough to suppress warnings about unused fields
2022-05-15 22:55:10 +01:00
Graham Esau
29d2455bb3 Update changelog 2022-05-15 22:35:06 +01:00
Andy Weiss
115a9eebf2 Add license notice to regex_syntax.rs
The comment in the code says this code was copied from another source
with an appropriate link. However just local to this file it is not
clear what the license terms of that code are. I added the license
notice to this file that governs the particular code that was copied
over.

I would like to use this crate in an environment where we want to be
clear about licensing. Hopefully this is an okay change otherwise I
would be more than happy to do this a different way as long as the
license provenance is clear.
2022-05-15 22:33:24 +01:00
Graham Esau
70f4fb051a Update changelog 2022-05-15 22:30:38 +01:00
Graham Esau
85ed613e4a Remove unnecessary derives on test struct 2022-05-15 22:30:38 +01:00
Graham Esau
feb6c4b2fe Use as instead of immediately-invoked typed function 2022-05-15 22:30:38 +01:00
Graeme Coupar
b38a55331b Support generic default values
I'm trying to `derive(JsonSchema)` on a field with a default that relies
on type inference to determine it's return type.  This causes compile
errors because schemars calls the default function without providing
any types for inference to use.

This changes that - wraps the `default` in a closure with a defined
return value that it immediately calls.  Feels a bit hacky, but I
couldn't think of a better way to fix this.
2022-05-15 22:30:38 +01:00
Graham Esau
e9d5f4057e v0.8.8 2021-11-25 22:28:38 +00:00
Adam H. Leventhal
98ad16288b Internally tagged enums don't honor deny_unknown_fields as precisely as
they might.

flatten doesn't act quite as intended with regard to
additional_properties
2021-11-25 21:55:48 +00:00
Graham Esau
d549957183 Document new optional dependencies 2021-11-25 21:42:54 +00:00
timando
f0d2b1c50c
Add support for rust_decimal and bigdecimal (#101) 2021-11-25 21:42:25 +00:00
Graham Esau
3cac0e5048 Add example for optional dependency in readme
Based on https://github.com/GREsau/schemars/pull/118/files
2021-11-25 21:12:30 +00:00
Graham Esau
1a13ba9f9b v0.8.7 2021-11-14 19:23:15 +00:00
Graham Esau
690fe44343 Allow non-Serialize default values.
Default values that don't implement Serialize are now ignored, rather than causing a compile error.
This is done by simulating specialization using a technique copied from Rocket:
5ebefa97c9/core/lib/src/sentinel.rs (L391-L445)

Fixes #115
2021-11-14 19:16:46 +00:00
Graham Esau
6f39a13724 Update examples after 0a1200b 2021-11-14 19:05:09 +00:00