loopbackio / loopbackio/loopback-next
bug: ajv example validation
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 5.1k
- Forks
- 1.1k
- Ø Merge
- 2 T. 21 Std.
- Gemergte PRs (30 T.)
- 27
Beschreibung
Describe the bug
Steps to reproduce
git clone https://github.com/mosoriob/loopback-next.git
cd loopback-next/
cd sandbox/validation-ajv
npm install
npm test
Current Behavior
The test fail with error:
Request POST /pets failed with status code 500. Error: strict mode: unknown keyword: "example"
Link to reproduction sandbox
https://github.com/mosoriob/loopback-next.git
More details
The API was generated using lb4 openapi
$ lb4 openapi pet.yaml
Loading pet.yaml...
? Select controllers and/or service proxies to be generated: OpenApiController
create src/models/pet.model.ts
create src/models/new-pet.model.ts
create src/models/error.model.ts
create src/controllers/open-api.controller.ts
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
added 38 packages, and audited 609 packages in 10s
80 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Logs
No response
Additional information
Similar to: https://github.com/loopbackio/loopback-next/issues/4939
Reproduction
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne in der Reproduktion sandbox/validation-ajv und führe npm install gefolgt von npm test aus, um den strict-mode-Fehler für das example-Schlüsselwort zu bestätigen. Verfolge die von lb4 openapi generierte API und ermittle, warum die Validierung dieses Schlüsselwort ablehnt; als erledigt gilt die Aufgabe, wenn der Reproduktionstest nicht mehr mit dem unknown-keyword-Fehler fehlschlägt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- nodejs, openapi, typescript
- Bereich
- api, backend, testing
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100