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

[Schema Inaccuracy] Repository Advisory's author and publisher fields

Aperta
#2,534 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
openapi
Ambito
api

Direzione di ricerca

Inizia individuando lo schema #/components/schemas/repository-advisory nella descrizione OpenAPI ed esamina i campi author e publisher. Verifica come le convenzioni dello schema del progetto e gli strumenti OpenAPI pertinenti interpretano le relative dichiarazioni allOf e type nullable. Il lavoro è completo quando entrambi i campi hanno una rappresentazione non ambigua e valida che supporta il caso d’uso di generazione del client segnalato.

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

Descrizione

feature fundamentals-and-support inaccuracy shield waiting for review

Schema Inaccuracy

Currently, the #/components/schemas/repository-advisory schema has two fields with interesting types:

        author:
          readOnly: true
          description: The author of the advisory.
          allOf:
          - "$ref": "#/components/schemas/simple-user"
          type:
          - 'null'
        publisher:
          readOnly: true
          description: The publisher of the advisory.
          allOf:
          - "$ref": "#/components/schemas/simple-user"
          type:
          - 'null'

This appears to be somewhat contradictory, though it's always possible I'm misunderstanding the intent and the spec. The impact is that I'm currently unable to generate client code using a custom code generator (which, of course, might be wrong).

Expected

I believe the contents of the allOf property should be part of type, creating a nullable union:

        author:
          readOnly: true
          description: The author of the advisory.
          type:
          - "$ref": "#/components/schemas/simple-user"
          - 'null'
        publisher:
          readOnly: true
          description: The publisher of the advisory.
          type:
          - "$ref": "#/components/schemas/simple-user"
          - 'null'

Reproduction Steps

This issue arose while generating code from the description, so no API endpoint calls are involved. The code generator is language-specific, so it's unlikely to be useful during reproduction.

Lingua principale
Nessun dato sulla lingua
Stelle
1.6k
Fork
342
Merge medio
2h 23m
PR unite (30g)
57

Guida per i contributori

Apri la guida per i contributori

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 github/rest-api-description

Tutte le issue di github/rest-api-description

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.