Repository navigation
Conversation
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
phipag
added this pull request to stack #2678
October 8, 2026 13:25
svozza
previously approved these changes
Oct 8, 2026
ValidationAspect compared the annotation schema version against DRAFT_2019_09 instead of the annotation default DRAFT_7. Every @Validation call without schemaVersion reset the version set in ValidationConfig, and an explicit DRAFT_2019_09 had no effect. The aspect now overrides the global version only when the annotation sets a non-default version.
phipag
force-pushed
the
fix/validation-schema-version
branch
from
October 8, 2026 16:52
8f0099f to
6f15efd
Compare
|
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Summary
Stacked on the json-schema-validator 2.x upgrade. Merge that PR first.
Changes
ValidationAspectcompared the annotation schema version againstDRAFT_2019_09. The annotation default isDRAFT_7. As a result:@Validationcall withoutschemaVersionreset the version set withValidationConfig.get().setSchemaVersion(...)to draft 7.@Validation(schemaVersion = DRAFT_2019_09)had no effect.This PR compares against
DRAFT_7. The aspect now overrides the global version only when the annotation sets a non-default version.ValidationAspect: compare againstDRAFT_7instead ofDRAFT_2019_09.ValidationAspectTest: add two tests. The first checks that a version set inValidationConfigsurvives a@Validationcall withoutschemaVersion. The second checks that an explicitDRAFT_2019_09applies. Both tests fail without the fix. An@AfterEachresets the global schema version.docs/utilities/validation.md: add one sentence on precedence.Issue number: closes #2676
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.