-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use lowercase SchemaType enum values #229
Conversation
Thanks! Can you do 2 things: |
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.
Hi @hsubox76 - thanks for reiterating what y'all already had in the contributing docs, and sorry for not reading those first! 🤦🏼 I've updated and rebased this PR accordingly. |
Just wanted to kindly nudge this, at least to let the unit tests run. Thanks! |
I'm waiting for this! |
Is this PR solving #153 |
This fixes the serialized values of the
SchemaType
enum to follow the swagger doc referenced in comments, and the json-schema spec upon which the swagger spec is based.This change makes this package compatible with the myriad other tools (like AJV) that allow the definition of validators, types, etc using standard json-schema.
I've tested sending lowercased values to gemini, and this appears to work perfectly, despite the TypeScript errors that this PR resolves.