Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Failed validating 'oneOf'

Aperta
#80 1 commento 5 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

No files, tests, or entry points are named. Start by reproducing the supplied validation error with the OpenAPI instance, then trace validation of the callbacks property and its oneOf schemas. Done means identifying whether the reported structure is invalid or the validator is producing an incorrect diagnostic, with a focused regression test if a defect is confirmed.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hello,
I don't understand the following validation error:

{'{$response.header.Location}': {'get': {'requestBody': {}, 'responses': {'301': {'x-scope': ['', '#/components/callbacks/moveProgress'], '$ref': '#/components/responses/MoveProgress'}, '303': {'x-scope': ['', '#/components/callbacks/moveProgress'], '$ref': '#/components/responses/MoveSuccess'}}}}} is not valid under any of the given schemas

Failed validating 'oneOf' in schema['properties']['paths']['patternProperties']['^/']['properties']['put']['properties']['callbacks']['additionalProperties']:
    {'oneOf': [{'$ref': '#/definitions/callback'},
               {'$ref': '#/definitions/reference'}]}

On instance['paths']['/users/user/{dn}']['put']['callbacks']['move-progress']:
    {'{$response.header.Location}': {'get': {'requestBody': {},
                                             'responses': {'301': {'$ref': '#/components/responses/MoveProgress',
                                                                   'x-scope': ['',
                                                                               '#/components/callbacks/moveProgress']},
                                                           '303': {'$ref': '#/components/responses/MoveSuccess',
                                                                   'x-scope': ['',
                                                                               '#/components/callbacks/moveProgress']}}}}}

The x-scope was not added by myself. I don't have any oneOf defined.
Maybe someone can point me to the error?

Lingua principale
Python
Stelle
409
Fork
73
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python-openapi/openapi-spec-validator

Tutte le issue di python-openapi/openapi-spec-validator

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.