Generate schema from any serializable value (#75)

Implement schema_for_value!(...) macro
This commit is contained in:
Graham Esau 2021-03-25 18:32:28 +00:00 committed by GitHub
parent 0957204bc1
commit f6482fd460
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 1179 additions and 5 deletions

View file

@ -0,0 +1,5 @@
use schemars::schema_for;
fn main() {
let _schema = schema_for!(123);
}

View file

@ -0,0 +1,7 @@
error: This argument to `schema_for!` is not a type - did you mean to use `schema_for_value!` instead?
--> $DIR/schema_for_arg_value.rs:4:19
|
4 | let _schema = schema_for!(123);
| ^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)