Support for minItems and maxItems for FunctionDeclarationSchemaType.ARRAY? #200
Labels
component:js sdk
Issue/PR related to JavaScript SDK
status:triaged
Issue/PR triaged to the corresponding sub-team
type:feature request
New feature request/enhancement
Description of the feature request:
choices: { type: FunctionDeclarationSchemaType.OBJECT, properties: { list: { type: FunctionDeclarationSchemaType.ARRAY, items: { type: FunctionDeclarationSchemaType.STRING, }, minItems: 1, maxItems: 3, }, }, required: ['list'], },
Error logged in Cloud console:
Invalid JSON payload received. Unknown name "maxItems" at 'generation_config.response_schema.properties[1].value.properties[0].value': Cannot find field. [{"@type":"type.googleapis.com/google.rpc.BadRequest","fieldViolations":[{"field":"generation_config.response_schema.properties[0].value.properties[0].value","description":"Invalid JSON payload received. Unknown name \"minItems\" at 'generation_config.response_schema.properties[0].value.properties[0].value': Cannot find field."},{"field":"generation_config.response_schema.properties[0].value.properties[0].value","description":"Invalid JSON payload received. Unknown name \"maxItems\" at 'generation_config.response_schema.properties[0].value.properties[0].value': Cannot find field."}]}]
What problem are you trying to solve with this feature?
Allowing setting min and max length of return array is pretty useful for many cases.
Any other information you'd like to share?
No response
The text was updated successfully, but these errors were encountered: