Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #306
gen
is a reserved keyword in rust 2024, making it very awkward to use as a module/variable name.This PR renames the
gen
module togenerate
, and allgen
variables/params togenerator
.gen
is still available as a module for backward-compatibility, but is marked as deprecated with a suggestion to use the new module name instead.In #306, I suggested making
SchemaSettings
available at the crate root (i.e. asschemars::SchemaSettings
), but I've since changed my mind. More types may be added to thegen
/generate
module in the future (e.g. the "contract" proposal) - and I'm concerned that having to always put them at the crate root may make it very busy. Also, if schemars gets new features in the future (e.g. validating values against schemas), then these features may need their own settings, in which case havingschemars::SchemaSettings
apply only to schema generation would be confusing.