Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly allow unknown fields #2080

Merged
merged 5 commits into from
Apr 4, 2024
Merged

Explicitly allow unknown fields #2080

merged 5 commits into from
Apr 4, 2024

Conversation

aumetra
Copy link
Member

@aumetra aumetra commented Mar 28, 2024

Closes #2019

Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good as the major step.

Now do you think you can turn off additional_properties (somewhere in the schemars types) at a later stage, maybe here?

impl Api {
    pub fn render(self) -> JsonApi {

@aumetra
Copy link
Member Author

aumetra commented Mar 28, 2024

Let's see if this does the trick

@aumetra
Copy link
Member Author

aumetra commented Mar 28, 2024

@webmaster128 this solution now generates more additionalProperties than before. Bad, good, neutral?

@webmaster128
Copy link
Member

Pretty good I think. The changes I see after generating this branch locally: "additionalProperties": false added for Empty, DenomUnit, DenomMetadata, BlockInfo, ContractInfo, TransactionInfo, Coin, ... This is pretty much all the types from cosmwasm-std which do not have #[cw_serde] available. So this is good.

@aumetra
Copy link
Member Author

aumetra commented Mar 28, 2024

Great! Then I'll look into updating the schemas later

@webmaster128
Copy link
Member

Nice. Could you add a CHANGELOG entry for this?

@aumetra
Copy link
Member Author

aumetra commented Mar 28, 2024

Looked over my PRs again and discovered some missing changelog entries.
Added them.

Copy link
Collaborator

@chipshort chipshort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@aumetra aumetra merged commit 6f46db9 into main Apr 4, 2024
29 checks passed
@aumetra aumetra deleted the aw/allow-unknown-fields branch April 4, 2024 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[cosmwasm-schema] make deny_unknown_fields optional
3 participants