Closed
Description
Description
description field in create key api endpoint is optional. but it's not optional in the pydantic Key schema
class _KeyBase(CamelBase):
uid: str
name: Optional[str] = None
description: str
actions: List[str]
indexes: List[str]
expires_at: Optional[datetime] = None
Current behavior
calling client.create_key() with null description raises this error
ValidationError: 1 validation error for Key
description
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.8/v/string_type
Environment
- Meilisearch version: 1.10.3
- meilisearch-python version: 0.31.6