Exact description of IValidation.IError.value
#193
Merged
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.
This pull request introduces improvements to validation handling, refactors error reporting, and updates test cases to align with the new validation logic. The most important changes include enhancements to the
IValidation
namespace, removal of unused code, and the addition of new test cases for validation scenarios.Enhancements to validation handling:
IValidation.IError.value
field to supportundefined
values for more precise error reporting in cases of missing required properties or null/undefined validation scenarios. This improves the flexibility and accuracy of validation feedback. (src/structures/IValidation.ts
, [1] [2]src/structures/IValidation.ts
, src/structures/IValidation.tsR142-R147)Refactoring:
description
field from error mapping inOpenApiValidator
, simplifying the error reporting logic. (src/utils/OpenApiValidator.ts
, src/utils/OpenApiValidator.tsL58)Updates to test cases:
discriminate.ts
to validate schemas usingOpenApiValidator
andtypia
, including validation of discriminated union types (ICat
andIAnt
). (test/src/executable/discriminate.ts
, test/src/executable/discriminate.tsR1-R33)validate.ts
that usedOpenApiTypeChecker
andClaudeSchemaComposer
, as it is no longer relevant to the updated validation logic. (test/src/executable/validate.ts
, test/src/executable/validate.tsL1-L245)