Serialization of empty field can create API validation error

オープン
#99 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python
領域
api

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
16
フォーク
3
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

zitadel/client-python のほかの issue

zitadel/client-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。