Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Serialization of empty field can create API validation error

Đang mở
#99 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
api

Hướng nghiên cứu

Start at models/user_service_human.py lines 81-83 and inspect how UserServiceSetHumanEmail(mail=None) is serialized. Reproduce the request-body behavior with a null email, then verify that unchanged values are not emitted as email: {} and no longer trigger the API validation error.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

https://github.com/zitadel/client-python/blob/b89a4b879d84766addbc19d7838f29265a6e5edf/zitadel_client/models/user_service_human.py#L81-L83

This if checks whether self.email is None, but it does not handle the case where self.email is a UserServiceSetHumanEmail(mail=None).

As a result, the serialization produces email: {} in the request body, and the Zitadel API responds with a 400 error because it expects email to be a valid string between 1 and 200 characters, even though it is null and should remain unchanged.

Ngôn ngữ chính
Python
Star
16
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của zitadel/client-python

Tất cả issue của zitadel/client-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.