Skip to content
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

null description in create key raises validation error #1038

Open
fadyZohdy opened this issue Nov 4, 2024 · 0 comments
Open

null description in create key raises validation error #1038

fadyZohdy opened this issue Nov 4, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@fadyZohdy
Copy link

fadyZohdy commented Nov 4, 2024

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
@sanders41 sanders41 added the good first issue Good for newcomers label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants