InvalidSchemaFormatValue exception when unmarshalling string with format 'byte'
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 45/100
Piste de recherche
Start by tracing the unmarshalling path for string values with the OpenAPI byte format and locate the format validation code. Add a regression test using base64.b64encode(b'\xff'); done means binary data that is not valid UTF-8 unmarshals without InvalidSchemaFormatValue.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
When validating a property of type
type: string
format: byte
it is assumed that the base64 encoded value can be represented as utf-8 string. As a result InvalidSchemaFormatValue is raised when unmarshalling binary data which can't be represented as utf-8 string, e.g. the value base64.b64encode(b'\xff').
The exception text is:
Failed to format value /w== to format byte: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte.
- Langage dominant
- Python
- Étoiles
- 368
- Forks
- 140
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de python-openapi/openapi-core
-
kind/bug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
python-openapi/openapi-core#1188 · 2 commentaires ·
-
kind/bug
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
python-openapi/openapi-core#1225 · 2 commentaires ·
-
kind/bug
Difficulté 3/5 1-2 jours Accessibilité débutants 76/100
python-openapi/openapi-core#1212 ·
-
[Bug]: Query parameter validation fails to match empty string when listed as a valid enum value Ouvertekind/bug
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
python-openapi/openapi-core#1210 ·
-
kind/bug kind/bug/confirmed
Difficulté 3/5 1-2 jours Accessibilité débutants 58/100
python-openapi/openapi-core#1180 · 3 commentaires ·
Toutes les issues de python-openapi/openapi-core
Issues similaires
-
货币战争手改优先级配置缺少列表元素类型校验(P3) Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Ouvertearea: ci bug perceived difficulty: 3
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
ClickHouse/clickhouse-connect#1057 ·