Skip to content

Conversation

samchon
Copy link
Owner

@samchon samchon commented May 21, 2025

This pull request introduces updates to the @samchon/openapi package, focusing on enhancing schema handling and adding comprehensive test cases. The key changes include a version bump, improvements to schema composition logic, and the addition of a detailed test for schema validation.

Package Version Update:

  • package.json: Updated the package version from 4.3.2 to 4.3.3 to reflect the new changes.

Schema Handling Enhancements:

  • src/composers/llm/LlmSchemaV3_1Composer.ts: Enhanced the schema composition logic by adding support for oneOf schemas in the LlmSchemaV3_1Composer class. This ensures proper handling of schemas with multiple possible types.

New Test for Schema Validation:

  • test/src/executable/validate.ts: Added a comprehensive test case to validate schemas using the ClaudeSchemaComposer and OpenApiTypeChecker. The test includes a complex schema with nested objects, arrays, and oneOf conditions, ensuring robust validation of OpenAPI components.

@samchon samchon requested a review from Copilot May 21, 2025 06:38
@samchon samchon self-assigned this May 21, 2025
@samchon samchon added the bug Something isn't working label May 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 fixes the bug in ClaudeSchemaComposer.invert() for handling oneOf schemas and enhances schema composition logic while adding comprehensive tests.

  • Schema inversion logic now correctly handles oneOf scenarios.
  • Comprehensive tests for schema validation are added.
  • The package version is updated to reflect the changes.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
test/src/executable/validate.ts Adds detailed tests covering nested schemas and oneOf conditions.
src/composers/llm/LlmSchemaV3_1Composer.ts Updates schema inversion logic to support oneOf schemas.
package.json Bumps package version from 4.3.2 to 4.3.3.

@samchon samchon merged commit fc14f94 into master May 21, 2025
4 checks passed
@samchon samchon deleted the feat/claude-oneOf branch May 21, 2025 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant