Request validation does not work properly in case request schema is an object "derived" from other object using allOf
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
No implementation files or tests are named. Start by reproducing the OpenAPI request-validation case with the shown allOf schema, then locate the validator and its existing schema-validation tests; done means unknown option_3 and capability_3 properties are rejected while inherited and declared properties remain valid.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Hi. I am trying to validate a request which is an object "derived" from other object using allOf
components:
schemas:
Base:
type: object
properties:
ctime:
type: integer
ExtendedResource:
allOf:
- $ref: '#/components/schemas/Base'
- type: object
properties:
name:
type: string
options:
type: object
properties:
option_1:
type: string
option_2:
type: string
capabilities:
type: object
properties:
capability_1:
type: string
capability_2:
type: string
Currently validator does not raise any exceptions in case of the following request body:
{'name': 'ext_res',
'options': {'option_1': 'a', 'option_3': 'b'},
'capabilities': {'capability_1': 'c', 'capability_3': '3'}}
Expecting that options.option_3 or capabilities.capability_3 are rejected.
Many Thanks!
- Vorherrschende Sprache
- Python
- Sterne
- 368
- Forks
- 140
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus python-openapi/openapi-core
-
kind/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
python-openapi/openapi-core#1188 · 2 Kommentare ·
-
kind/bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
python-openapi/openapi-core#1225 · 2 Kommentare ·
-
kind/bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 76/100
python-openapi/openapi-core#1212 ·
-
[Bug]: Query parameter validation fails to match empty string when listed as a valid enum value Offenkind/bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
python-openapi/openapi-core#1210 ·
-
kind/bug kind/bug/confirmed
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 58/100
python-openapi/openapi-core#1180 · 3 Kommentare ·
Alle Issues in python-openapi/openapi-core
Ähnliche Issues
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
canonical/paas-charm#368 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
tech debt
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
StevenBlack/hosts#3256 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
qualcomm/qai-appbuilder#275 ·