Skip to content

SubConfig: allow to actually validate the nested configs #2807

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

Merged
merged 7 commits into from
Aug 17, 2022

Conversation

smarie
Copy link
Contributor

@smarie smarie commented Mar 27, 2022

Fixes #2709

This is a fix for previous PR (reverted) #2710

SubConfig now has an optional constructor argument named ignore_validation. By default it is True to preserve retrocompatibility with legacy. Setting it to False will now correctly collect and raise validation errors and warnings for subconfig items.

@smarie smarie changed the title Feature/2709 subconfig fix SubConfig : new ignore_validation constructor parameter. Mar 27, 2022
@smarie
Copy link
Contributor Author

smarie commented Mar 28, 2022

Note that another way to fix this would be to make subconfig strict by default, but toggle the "non-strict" flag in the default config schema for the "extra" option. As you prefer, just let me know

@oprypin
Copy link
Contributor

oprypin commented Aug 16, 2022

Thank you very much for the contribution. Finally I come back to ConfigOptions. And this makes perfect sense, particularly together with #2916 and #2938. I merged master (was needed after #2916) and added some of my own changes.

@oprypin oprypin changed the title SubConfig : new ignore_validation constructor parameter. SubConfig: allow to actually validate the nested configs Aug 16, 2022
@oprypin oprypin merged commit c5619db into mkdocs:master Aug 17, 2022
@smarie smarie deleted the feature/2709_subconfig_fix branch September 3, 2022 12:56
@smarie
Copy link
Contributor Author

smarie commented Sep 3, 2022

Thanks @oprypin !

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.

SubConfig ignore configuration failures
2 participants