oneOf in array items not working
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 45/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- python
- Domaine
- backend-api-design
Piste de recherche
Start by reproducing the failure with the schema and request examples in the issue, focusing on array item validation with oneOf. Trace the validation path that raises UndefinedSchemaProperty for the package variant. Done means both image and package array items are validated against their matching schemas without the reported exception.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
If you have multiple types (oneOf) of items in an array only the first is validated against:
schema
conditions:
type: array
items:
oneOf:
- type: object
required:
- image
properties:
image:
type: string
additionalProperties: false
- type: object
required:
- package
properties:
package:
type: array
items:
type: string
minItems: 2
request
{'conditions': [{'image': 'data'}, {'package': ['info', 'data']}]}
Yields: openapi_core.schema.schemas.exceptions.UndefinedSchemaProperty: Undefined properties in schema: {'package'}
- 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
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
canonical/paas-charm#368 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
tech debt
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
addition to tracking list Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
StevenBlack/hosts#3256 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
qualcomm/qai-appbuilder#275 ·