Skip to content

Conversation

samchon
Copy link
Owner

@samchon samchon commented Jul 20, 2025

This pull request introduces a new equals property across multiple namespaces and utilities to enforce stricter schema validation by disallowing superfluous properties. The changes span schema composers, application structures, and validation utilities, ensuring consistent handling of this new property throughout the codebase.

Addition of equals property:

Schema composers:

  • Added equals property to schema composers like ChatGptSchemaComposer, LlmSchemaV3Composer, and LlmSchemaV3_1Composer to specify whether superfluous properties should be disallowed during schema separation and validation. ([[1]](https://github.com/samchon/openapi/pull/195/files#diff-d0c4b1bc6bd6c1280622ba3db00bf102c54ccb57a60d124822ff0d592628d9cfR246), [[2]](https://github.com/samchon/openapi/pull/195/files#diff-02fa51db5bda226c48ccb28078266cc34a34d5dab1af1223bd8000ee688cd7b4R177), [[3]](https://github.com/samchon/openapi/pull/195/files#diff-77518819d0e39da5042e7d25b6345cea620bf8c2f3c181f2bee598b499334881R370))
  • Integrated the equals property into schema validation logic within the composers to enforce stricter property checks when specified. ([[1]](https://github.com/samchon/openapi/pull/195/files#diff-d0c4b1bc6bd6c1280622ba3db00bf102c54ccb57a60d124822ff0d592628d9cfR301), [[2]](https://github.com/samchon/openapi/pull/195/files#diff-02fa51db5bda226c48ccb28078266cc34a34d5dab1af1223bd8000ee688cd7b4R196), [[3]](https://github.com/samchon/openapi/pull/195/files#diff-77518819d0e39da5042e7d25b6345cea620bf8c2f3c181f2bee598b499334881R425))

Application structures:

  • Added equals property to IHttpLlmApplication and IMcpLlmApplication structures to allow configuration of stricter validation rules at the application level. ([[1]](https://github.com/samchon/openapi/pull/195/files#diff-6e6bececd1bc7bc3c702e37136705a8f14fb4a04438d2cc56b49b8a9dad83e5dR99-R101), [[2]](https://github.com/samchon/openapi/pull/195/files#diff-140c0d5f926889bdec178ba6d2d9c80682ef1d6910aae39cd3a7996c39292c0cR62-R64))

Validation utilities:

  • Updated OpenApiValidator and its internal utilities (OpenApiObjectValidator, IOpenApiValidatorContext) to support the equals property. This includes logic to disallow additional properties when equals is set to true. ([[1]](https://github.com/samchon/openapi/pull/195/files#diff-fcb2482cc0ca0ebdef44a09f132db43fff83d986eaf169ab100506eabdf0caccR11), [[2]](https://github.com/samchon/openapi/pull/195/files#diff-fcb2482cc0ca0ebdef44a09f132db43fff83d986eaf169ab100506eabdf0caccR21-R29), [[3]](https://github.com/samchon/openapi/pull/195/files#diff-4b5f041317bfdfa1707715a6d72a19c9d1c0789a7ad8338d4de6fc5c89d5aa0cR16), [[4]](https://github.com/samchon/openapi/pull/195/files#diff-5ba1404ef6788345b2158c17e4b3abc9ac7fadaee65e1a39045ea52ad5f311c4R48-R76))

@samchon samchon requested a review from Copilot July 20, 2025 17:36
@samchon samchon self-assigned this Jul 20, 2025
@samchon samchon added the enhancement New feature or request label Jul 20, 2025
Copilot

This comment was marked as outdated.

@samchon samchon requested a review from Copilot July 21, 2025 02:16
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 introduces a new equals property to enforce stricter validation by disallowing superfluous properties across schema composers, application interfaces, and validation utilities. The changes modernize test structures by removing legacy test files, cleaning up generator functions, and implementing a comprehensive validateEquals feature with new test infrastructure.

  • Adds equals property support across LLM schema composers and validation utilities for stricter property validation
  • Removes legacy test structures (ObjectUndefined, ObjectGeneric* types) and updates existing test infrastructure
  • Implements new validateEquals test feature with comprehensive test file generation and validation logic

Reviewed Changes

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

Show a summary per file
File Description
src/utils/OpenApiValidator.ts Adds equals parameter to validator configuration
src/utils/internal/OpenApiObjectValidator.ts Implements equals validation logic to detect superfluous properties
src/composers/llm/*.ts Integrates equals property into LLM schema composers
test/src/structures/Object*.ts Removes legacy test structures and cleans up existing generators
test/src/features/validateEquals/*.ts Adds comprehensive validateEquals test suite
Comments suppressed due to low confidence (1)

test/src/features/internal/_test_validateEquals.ts:64

  • The constant name KEY is too generic and ambiguous. Consider renaming it to SUPERFLUOUS_PROPERTY_KEY or TEST_EXTRA_PROPERTY to better describe its purpose.
const KEY = "non_regular_member";

@samchon samchon merged commit f61495f into master Jul 21, 2025
4 checks passed
@samchon samchon deleted the feat/eqaul branch July 21, 2025 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant