cw-schema 3.0.5

A dependency for CosmWasm contracts to generate schema files for their messages.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![allow(dead_code)]

use cw_schema::Schemaifier;
use std::borrow::Cow;

#[derive(Schemaifier)]
struct NonStatic<'a> {
    test1: &'a str,
    test2: Cow<'a, str>,
    test3: Cow<'static, str>,
    test4: &'static str,
}

#[test]
fn non_static_schema() {
    let schema = cw_schema::schema_of::<NonStatic<'_>>();
    insta::assert_json_snapshot!(schema);
}