stellar_xdr/curr/
jsonschema.rs

1#![cfg(feature = "schemars")]
2use schemars::{gen::SchemaGenerator, schema::Schema, JsonSchema};
3
4macro_rules! impl_json_schema_string {
5    ($type:ident) => {
6        impl JsonSchema for super::$type {
7            fn schema_name() -> String {
8                stringify!($type).to_string()
9            }
10
11            fn json_schema(gen: &mut SchemaGenerator) -> Schema {
12                String::json_schema(gen)
13            }
14        }
15    };
16}
17
18impl_json_schema_string!(PublicKey);
19impl_json_schema_string!(AccountId);
20impl_json_schema_string!(MuxedAccount);
21impl_json_schema_string!(MuxedAccountMed25519);
22impl_json_schema_string!(SignerKey);
23impl_json_schema_string!(SignerKeyEd25519SignedPayload);
24impl_json_schema_string!(NodeId);
25impl_json_schema_string!(ScAddress);
26impl_json_schema_string!(AssetCode);
27impl_json_schema_string!(AssetCode4);
28impl_json_schema_string!(AssetCode12);
29impl_json_schema_string!(ClaimableBalanceId);