Expand description
CosmWasm is a smart contract platform for the Cosmos ecosystem. This crate is a dev-dependency for CosmWasm contracts to generate JSON Schema files.
For more information, see: https://cosmwasm.cosmos.network
Re-exports§
Macros§
- generate_
api - Generates an
Api
for the contract. The body describes the message types exported in the schema and allows setting contract name and version overrides. - schema_
for - Generates a
RootSchema
for the given type using default settings. - write_
api - Takes care of generating the interface description file for a contract. The body describes the message types included and allows setting contract name and version overrides.
Structs§
Constants§
- IDL_
VERSION - The version of the CosmWasm IDL.
Traits§
- Query
Responses - A trait for tying QueryMsg variants (different contract queries) to their response types.
This is mostly useful for the generated contracted API description when using
cargo schema
.
Functions§
- combine_
subqueries - Combines multiple response schemas into one. Panics if there are name collisions.
Used internally in the implementation of
QueryResponses
when using#[query_responses(nested)]
- export_
schema - Exports a schema, auto-generating filename based on the metadata title of the generated schema.
- export_
schema_ with_ title - Use this if you want to override the auto-detected name of the object. very useful when creating an alias for a type-alias.
- remove_
schemas
Attribute Macros§
- cw_
serde - An attribute macro that annotates types with things they need to be properly (de)serialized for use in CosmWasm contract messages and/or responses, and also for schema generation.