-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use lowercase SchemaType enum values (#229)
This fixes the serialized values of the `SchemaType` enum to follow [the referenced doc](https://swagger.io/docs/specification/data-models/data-types/) and [the json-schema spec](https://json-schema.org/draft/2020-12/json-schema-core#section-4.2.1) on which the reference is based. This change makes the JS gemini SDK compatible with the myriad tools like [AJV](https://ajv.js.org/guide/typescript.html) that allow the definition of validators, types, etc using standard json-schema. In practice the lowercased values appear to work perfectly, but show TypeScript errors.
- Loading branch information
1 parent
7d01195
commit 00dc7a1
Showing
6 changed files
with
35 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@google/generative-ai": minor | ||
--- | ||
|
||
Use lowercase SchemaType enum values to match json-schema. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters