support for definition in queryMsg / execMsg in schemas
Closed this issue · 2 comments
whalelephant commented
When generating schemas from sylvia framework written contracts, the queryMsg (and execMsg) is a ref to a definition, this causes error in ts-codegen.
/Users/.../node_modules/wasm-ast-types/main/client/client.js:175
var methods = (0, _utils.getMessageProperties)(queryMsg).map(function (jsonschema) {
^
Example of the schema
"query": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "QueryMsg",
"anyOf": [
{
"$ref": "#/definitions/InstallableQueryMsg"
},
{
"$ref": "#/definitions/QueryMsg"
}
],
"definitions": {
"InstallableQueryMsg": {
"type": "string",
"enum": []
},
"QueryMsg": {
"oneOf": [
{ ...}
full version: https://gist.github.com/whalelephant/957540ad83f8a35c05cd08fa7a009385#file-schema-json-L281
adairrr commented
@pyramation I believe that this is an issue with parsing the entry-point messages here:
We should be collapsing the schema first to find them.
pyramation commented
should be fixed!
Successfully published:
- @cosmwasm/ts-codegen@0.26.0