Skip to content

Conversation

samchon
Copy link
Owner

@samchon samchon commented Jul 21, 2025

This pull request enhances error reporting in the OpenAPI validation utilities by adding detailed descriptions to validation errors. These changes improve the clarity of error messages, making it easier for developers to understand and resolve issues.

Enhancements to error reporting:

  • src/utils/OpenApiValidator.ts: Updated the error object to include a description field. If the error's value is undefined, a default description is added to guide developers on how to address the issue.
  • src/utils/internal/OpenApiObjectValidator.ts: Added a description field to the error object for undefined properties, providing specific guidance to remove the property from the object.

@samchon samchon requested a review from Copilot July 21, 2025 08:54
@samchon samchon self-assigned this Jul 21, 2025
@samchon samchon added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 21, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request enhances error reporting in the OpenAPI validation utilities by adding detailed descriptions to validation errors. The changes provide more informative error messages to help developers understand and resolve validation issues, particularly for undefined values and undefined properties.

Key changes:

  • Enhanced error object creation to include description fields with contextual guidance
  • Added specific handling for undefined values with helpful developer instructions
  • Provided clear messaging for undefined properties with removal guidance

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/utils/OpenApiValidator.ts Enhanced error object creation with description field and special handling for undefined values
src/utils/internal/OpenApiObjectValidator.ts Added description field for undefined property errors with specific removal guidance

samchon and others added 2 commits July 21, 2025 17:55
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@samchon samchon merged commit 79923ac into master Jul 21, 2025
4 checks passed
@samchon samchon deleted the feat/validate-description branch July 21, 2025 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant