oneOf fails in post parameter
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- openapi, python
- Ambito
- api, backend-api-design
Direzione di ricerca
Start by reproducing the failure with the Swagger oneOf example and the YAML source spec included in the issue. Trace validation of the OpenAPI 3 requestBody and its nested schema oneOf, then verify that this valid specification is accepted without the reported oneOf error.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Try validating against the schema from https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/
Got error of
Failed validating 'oneOf' in schema['properties']['paths']['patternProperties']['^/']['properties']['patch']['properties']['requestBody']:
{'oneOf': [{'$ref': '#/definitions/requestBody'},
{'$ref': '#/definitions/reference'}]}
Source spec file
paths:
/pets:
patch:
requestBody:
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/Cat'
- $ref: '#/components/schemas/Dog'
responses:
'200':
description: Updated
components:
schemas:
Dog:
type: object
properties:
bark:
type: boolean
breed:
type: string
enum: [Dingo, Husky, Retriever, Shepherd]
Cat:
type: object
properties:
hunts:
type: boolean
age:
type: integer
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di python-openapi/openapi-spec-validator
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 30/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
python-openapi/openapi-spec-validator#400 · 1 commento ·
-
kind/bug/confirmed
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
python-openapi/openapi-spec-validator#373 · 1 commento ·
Tutte le issue di python-openapi/openapi-spec-validator
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
learningequality/ricecooker#747 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
run-llama/llama_index#23199 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
KhronosGroup/glTF-Blender-IO#2769 ·