1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
use std::path::Path;
use abstract_sdk::base::endpoints::{InstantiateEndpoint, MigrateEndpoint, QueryEndpoint};
use cosmwasm_schema::{export_schema_with_title, schema_for};
use schemars::JsonSchema;
use serde::Serialize;
use crate::{Host, HostError};
impl<
Error: From<cosmwasm_std::StdError> + From<HostError>,
CustomExecMsg: Serialize + JsonSchema,
CustomInitMsg: Serialize + JsonSchema,
CustomQueryMsg: Serialize + JsonSchema,
CustomMigrateMsg: Serialize + JsonSchema,
ReceiveMsg: Serialize + JsonSchema,
> Host<Error, CustomExecMsg, CustomInitMsg, CustomQueryMsg, CustomMigrateMsg, ReceiveMsg>
{
pub fn export_schema(out_dir: &Path) {
export_schema_with_title(
&schema_for!(<Self as InstantiateEndpoint>::InstantiateMsg),
out_dir,
"InstantiateMsg",
);
export_schema_with_title(
&schema_for!(<Self as QueryEndpoint>::QueryMsg),
out_dir,
"QueryMsg",
);
export_schema_with_title(
&schema_for!(<Self as MigrateEndpoint>::MigrateMsg),
out_dir,
"MigrateMsg",
);
}
}