Fix gemini
schema's oneOf
detection logic.
#93
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 includes several changes to the
@samchon/openapi
package, focusing on improving schema validation and adding new test cases for the Gemini converter. The most important changes include updating the package version, enhancing the validation logic inChatGptConverter
andGeminiConverter
, and adding new test cases for schema validation.Version Update:
package.json
to2.0.0-dev.20241129-4
.Validation Enhancements:
src/converters/ChatGptConverter.ts
: Added a newvalidate
function to handle schema validation and updated the existing validation logic to use this function. [1] [2]src/converters/GeminiConverter.ts
: Added validation logic for handling nullable cases and enum cases within the schema.src/converters/LlmConverterV3_1.ts
: Introduced an optionalvalidate
function in theLlmConverterV3_1
namespace to enhance schema validation.Test Cases:
test_gemini_schema_enum
to validate enum schemas intest/features/llm/gemini/test_gemini_schema_enum.ts
.test_gemini_schema_nullable
to validate nullable schemas intest/features/llm/gemini/test_gemini_schema_nullable.ts
.Utility Imports:
src/converters/GeminiConverter.ts
: ImportedMapUtil
to assist with schema transformation logic.