OpenAPI 3.0 spec pattern constant validation
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 42/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- backend-api-design
Rechercherichtung
No file or test is named in the issue. Start by reproducing the validator behavior with the two pattern examples, then locate the OpenAPI 3.0 pattern validation entry point. Done means slash-delimited ECMA 262 patterns are accepted while the undelimited form is rejected.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Description
According to the OpenAPI 3.0 specification for the pattern attribute of a schema object, the pattern provided should comply with ECMA 262 regular expression syntax. The syntax defined in that specification defines regular expression literals as being preceded and trailed by a '/' character, as they are in Javascript/ECMAscript.
Expected behaviour
Pattern specified in a specification as:
pattern: /regular expression/
should be valid, patterns specified without the leading and trailing '/' characters should not.
Actual Behavior
Both
pattern: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
and
pattern: ^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$
are valid pattern constants according to the validator. The second should not be valid, unless I'm misreading the two specification documents linked above.
This is a follow up on Connexion issue number 871.
- Vorherrschende Sprache
- Python
- Sterne
- 409
- Forks
- 73
- 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-spec-validator
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 30/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
python-openapi/openapi-spec-validator#400 · 1 Kommentar ·
-
kind/bug/confirmed
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
python-openapi/openapi-spec-validator#373 · 1 Kommentar ·
Alle Issues in python-openapi/openapi-spec-validator
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Offenarea: ci bug perceived difficulty: 3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
ClickHouse/clickhouse-connect#1057 ·