Closed vh closed 2 years ago
There is the following document:
{ "openrpc": "1.2.4", "info": { "version": "1.0.0" }, "methods": [ { "name": "test", "paramStructure": "by-name", "params": [ { "name": "param1", "required": false, "schema": { "type": "string" } }, { "name": "param2", "required": false, "schema": { "type": "string" } }, { "name": "param3", "required": false, "schema": { "type": "string" } } ], "result": { "name": "result", "schema": { "type": "string" } } } ] }
Generated typing for such method is:
export type Test = (param1?: StringDoaGddGA, param2?: StringDoaGddGA, param3?: StringDoaGddGA) => Promise<StringDoaGddGA>;
All params are optional.
Trying to make a call like that:
{ "jsonrpc": "2.0", "method": "test", "params": { "param2": "test" } }
param1 is set instead of param2.
param1
param2
Params mapping will always be wrong in similar cases
:tada: This issue has been resolved in version 1.9.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
There is the following document:
Generated typing for such method is:
All params are optional.
Trying to make a call like that:
param1
is set instead ofparam2
.Params mapping will always be wrong in similar cases