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.
(Yikes, I really dropped the ball on those first few commit messages 😬)
This was intended to be "just" a change to split the single
Attrs
type out into separate types for field/variant/containers, but it soon spiralled into a major rewrite that touched pretty much all parts of schemars_derive.Attributes that were previously silently ignored (e.g.
with
/schema_with
or validation attributes on structs) will now cause compile errors. Whether this is actually a breaking change is a matter of perspective, but there are definitely some other breaking changes in this PR, mostly around validation attributes:phone
andrequired_nested
validation attributes (they were removed from the validator crate a while ago)regex
andcontains
validation attributes must now be specified in list formregex(path = ...)
rather than name/value formregex = ...
(again for consistency with the current state of the validator crate). I don't like how verbose it makes them, but it will be slightly simpler once I've added support for garde-style attributes (in a future change)