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

Only set unset additionalProperties fields to false #2310

Merged
merged 4 commits into from
Jan 6, 2025

Conversation

aumetra
Copy link
Member

@aumetra aumetra commented Dec 12, 2024

Closes #2309

@aumetra aumetra marked this pull request as ready for review December 20, 2024 23:05
@aumetra
Copy link
Member Author

aumetra commented Dec 20, 2024

@snoyberg apologies for the delay. It would be great if you could run your codegen against this patch and see if the schemas look good. If they do, we can merge this.

@snoyberg
Copy link
Contributor

Thank you @aumetra! I can confirm that with this change, we end up with the correct generated schema files. Much appreciated!

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.

LGTM

@@ -19,5 +19,6 @@ thiserror = "1.0.26"

[dev-dependencies]
anyhow = "1.0.57"
insta = { version = "1.41.1", features = ["json"] }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice, didn't know this one yet.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, it's pretty neat! Even though it adds a few dev dependencies, but since the PR with the new schema format makes pretty extensive use of insta there's no damage in introducing it here already

@chipshort
Copy link
Collaborator

Could you add a changelog entry?

@chipshort
Copy link
Collaborator

Oh, looks like we should unify the changelogs of the release branches with main and start a new entry after the 2.2 release.
But I can do that in a separate PR, so I'm merging this now.

@chipshort chipshort merged commit c9220c2 into main Jan 6, 2025
36 of 38 checks passed
@chipshort chipshort deleted the aw/fix-additional-properties branch January 6, 2025 15:22
@chipshort chipshort mentioned this pull request Jan 6, 2025
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.

schema_for! on HashMap and BTreeMap no longer generates field information for values
3 participants