Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Compose all component types, not just schemas

Offen
#2,936 4 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
30/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
openapi
Bereich
api

Rechercherichtung

Beginnen Sie mit der Überprüfung der in der Spezifikation beschriebenen Regeln für Response-Komponenten, der $ref-Syntax, der allOf-Komposition und der Einschränkungen für Sibling-Properties. Definieren Sie das erwartete Verhalten für die Komposition einer wiederverwendbaren Response mit endpoint-spezifischen Modellen oder Beispielen, und dokumentieren und validieren Sie anschließend ein Beispiel, das zeigt, dass das resultierende Dokument gültig ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

re-use: ref-group-combine

The current state of affairs is that responses can be defined as components and referenced with the "$ref":"{uri}" syntax, but these cannot be composed using the allOf directive. Trying to do so results in an error. Adding sibling properties also results in an error. So there is currently no way to define a response with a general schema and then add endpoint-specific models or examples. This seems like a gross oversight and major limitation.

For example, let's say that there are multiple endpoints that return lists of models following a standard response format, but each endpoint returns different models. It would be ideal to keep the reusable format of the response in a response component and compose it with the specific model under the path definition.

Without this functionality, the only options are to have invalid documents or abandon the use of response components.

Vorherrschende Sprache
Markdown
Sterne
31.2k
Forks
9.2k
Ø Merge
2 T. 9 Std.
Gemergte PRs (30 T.)
17

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus OAI/OpenAPI-Specification

Alle Issues in OAI/OpenAPI-Specification

Ähnliche Issues

Weitere Issues zu Backend & API Design

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.