Skip to content

Support import alias in cosmwasm-schema #1502

Open
@j0nl1

Description

@j0nl1

Currently now cosmwasm-schema doesn't support import alias, it uses the same ref name for different aliases.

pub use cw20_stake::msg::ExecuteMsg as StakeExecuteMsg;
pub use cw_proposal_single::msg::ExecuteMsg as ProposalExecuteMsg;

Ex:

{
  "type": "object",
  "required": [
    "stake_actions"
  ],
  "properties": {
    "stake_actions": {
      "$ref": "#/definitions/ExecuteMsg"
    }
  },
  "additionalProperties": false
},
{
  "type": "object",
  "required": [
    "proposal_actions"
  ],
  "properties": {
    "proposal_actions": {
      "type": "object",
      "required": [
        "msg",
        "prop_module_addr"
      ],
      "properties": {
        "msg": {
          "$ref": "#/definitions/ExecuteMsg"
        },
        "prop_module_addr": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions