-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround Even Better TOML crash related to
allOf
(#15992)
## Summary Fixes #15978 Even Better TOML doesn't support `allOf` well. In fact, it just crashes. This PR works around this limitation by avoid using `allOf` in the automatically derived schema for the docstring formatting setting. ### Alternatives schemars introduces `allOf` whenver it sees a `$ref` alongside other object properties because this is no longer valid according to Draft 7. We could replace the visitor performing the rewrite but I prefer not to because replacing `allOf` with `oneOf` is only valid for objects that don't have any other `oneOf` or `anyOf` schema. ## Test Plan https://github.com/user-attachments/assets/25d73b2a-fee1-4ba6-9ffe-869b2c3bc64e
- Loading branch information
1 parent
b66cc94
commit 7cac0da
Showing
2 changed files
with
41 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.