Mis-canonicalisation of `const` in draft04 schemas (not a keyword until draft06)
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 30/100
Rechercherichtung
Start by reading the schema canonicalisation code and its tests to find how draft-specific keywords are handled; the issue does not name their paths. Reproduce the example with a draft-04 schema and check how const is processed. Done means canonicalisation follows draft-04 semantics and the result matches the stated enum: [None] expectation.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
The const keyword was added in draft-06, and therefore has no effect whatsoever in draft-04 schemas. While authors probably intended to constrain the value somewhat, we still have to follow the spec!
{
"$schema": "http://json-schema.org/draft-04/schema#",
"oneOf": [{"type": "boolean"}, {"const": None}],
"type": ["boolean", "null"],
}
# Should canonicalise
# {"const": None} -> {}
# "oneOf": [{"type": "boolean"}, {}] -> "not": {"type": "boolean"}
# and ultimately to
{"enum": [None]}
See also https://github.com/Julian/jsonschema/issues/778; longer term this is another argument for my do-it-right schema processing redesign...
- Vorherrschende Sprache
- Python
- Sterne
- 281
- Forks
- 35
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
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-jsonschema/hypothesis-jsonschema
-
Missing test files in Pypi releaseEvtl. vergeben @blouirts123 hat das vor 49 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 35/100
-
Shouldn't PKG-INFO Homepage point to https://github.com/python-jsonschema/hypothesis-jsonschema ?Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 58/100
python-jsonschema/hypothesis-jsonschema#114 · 1 Kommentar ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 55/100
python-jsonschema/hypothesis-jsonschema#113 · 1 Reaktion ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 30/100
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
python-jsonschema/hypothesis-jsonschema#104 · 3 Reaktionen ·
Alle Issues in python-jsonschema/hypothesis-jsonschema
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
Techiebutler/freeframe#687 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug verbose GC
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
IBM/javacore-analyser#677 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
Maintainer antworten meist innerhalb von 2 Tagen
-
area/config comp/plugins P1 platform/qqbot tool/file type/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
NousResearch/hermes-agent#163932 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
plugins/dsh: todayStr() computes UTC but is documented as local — journal entries written 00:00–08:00 local land in the previous day's fileEvtl. vergeben @Beehtrix hat das heute übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
zilliztech/memsearch#907 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag