CosmWasm / cosmwasm

Framework for building smart contracts in Wasm for the Cosmos SDK
https://www.cosmwasm.com/
Apache License 2.0
1.06k stars 329 forks source link

[cosmwasm-schema] make deny_unknown_fields optional #2019

Closed lvn-ryu closed 5 months ago

lvn-ryu commented 7 months ago

See https://github.com/CosmWasm/cosmwasm/pull/2017#issuecomment-1931837751 for suggested implementation

webmaster128 commented 5 months ago

@aumetra could you have a look into that?

I think we should ensure NOT to set deny_unknown_fields for the deserializer. If we need to make modufications to the JSON Schema, those should be done in post-processing after schemars. Making undesired deserializer configurations for the sale of better TS types is the wrong priorization.

We'd need to revert parts of https://github.com/CosmWasm/cosmwasm/issues/1307 and move the removal of {[k: string]: unknown} in TypeScript to a later point in the process.