Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Traits fixtures use a target that is not RFC 9535 (`@.x-oai-traits`)

Aperta Adatta ai principianti
#415 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, yaml
Ambito
testing

Direzione di ricerca

Aggiorna le voci target in tests/v1.0/pass/actions-traits-example.yaml, tests/v1.1/pass/actions-traits-example.yaml e tests/v1.2-dev/pass/actions-traits-example.yaml in modo che corrispondano all’esempio corretto dei traits nella specifica. Inizia confrontando questi fixture con l’esempio nell’issue, poi esegui la suite di test dello schema sui fixture. Il lavoro è completato quando tutti e tre usano il target corretto e selezionano le operazioni previste.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The traits fixtures in the schema test suite use a target that is not a valid RFC 9535 query:

  • tests/v1.0/pass/actions-traits-example.yaml
  • tests/v1.1/pass/actions-traits-example.yaml
  • tests/v1.2-dev/pass/actions-traits-example.yaml
- target: $.paths.*.get[[email protected]]

In RFC 9535, a member name in shorthand notation cannot contain - (section 2.5.1.1: name-char = name-first / DIGIT, and name-first excludes -), so @.x-oai-traits is a syntax error; it would have to be @['x-oai-traits']. The fixtures pass because the schema only checks pattern: ^\$ on target. But an implementation that follows the "RFC9535 Compliance" section ("MUST fully implement RFC9535") has to reject these overlays, so the "pass" fixtures cannot be used to test tools.

Even in bracket notation, the target would filter the members of each get operation, not the operations themselves, and paged is an array element, not a member. #229 fixed the same example in the specification text (now in 1.1.0 and 1.2.0) to:

- target: $.paths[?(@.get['x-oai-traits'][?(@ == 'paged')])].get

Suggestion: use that target in the three fixtures, so that they match the specification's traits example.

Found while running the fixtures against an RFC 9535 implementation that passes the JSONPath Compliance Test Suite; the corrected target parses and selects the expected operations on the specification's example description.

Lingua principale
JavaScript
Stelle
122
Fork
38
Merge medio
1g 17h
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OAI/Overlay-Specification

Tutte le issue di OAI/Overlay-Specification

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.