Proposal: Support for HTTP compression
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Bereich
- api, documentation
Rechercherichtung
Beginne mit der Überprüfung der Definitionen von OpenAPI Object und Path Item Object in OpenAPI 3.0 und vergleiche anschließend die vorgeschlagenen Felder von Compression Object mit den vorhandenen Attributen consumes und produces. Als abgeschlossen gilt die Aufgabe, wenn das Kompressionsmodell, der Geltungsbereich und das Überschreibungsverhalten vereinbart und in die Spezifikation aufgenommen wurden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
This is a proposal to add support for HTTP compression to version 3.0 of the OpenAPI specification.
Rationale for this change
At present, there is no robust way to determine from an OpenAPI specification what HTTP encodings a server is willing to accept for requests or is willing to encode responses in.
It is possible to list the Content-Encoding and Accept-Encoding HTTP headers as optional parameters in request and response objects, but this approach is complex and difficult to understand. Moreover, other standard HTTP headers, such as Accept, Content-Type and Authorization, are already represented by dedicated consumes/produces and security attributes.
Proposed addition to the specification
One way to implement support for HTTP compression would be to add a field to the OpenAPI Object called "compression" that maps to a Compression Object.
The Compression Object would have two fields, "consumes" and "produces":
- The
"consumes"field would map to an array of strings; each string is an encoding that the API is willing to accept in HTTP requests. In other words, the server is prepared to accept requests with aContent-Encodingheader with a value consisting of any one of the items in the array. - The
"produces"field would map to an array of strings; each string is an encoding that the API is prepared to send in HTTP responses. In other words, the server is prepared to send responses with aContent-Encodingheader with a value consisting of any one of the items in the array.
It may be a good idea to allow the global compression settings to be overridden on a per-path basis by adding a "compression" field to the Path Item Object as well.
Example
The following snippet describes an API that can accept requests with a Content-Encoding of gzip, deflate, or compress, and is capable of sending responses with a Content-Encoding of gzip or deflate:
"compression": {
"consumes": [
"gzip",
"deflate",
"compress"
],
"produces": [
"gzip",
"deflate"
]
}
- Vorherrschende Sprache
- Markdown
- Sterne
- 31.2k
- Forks
- 9.2k
- Ø Merge
- 6 Std. 37 Min.
- Gemergte PRs (30 T.)
- 27
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 OAI/OpenAPI-Specification
-
Housekeeping
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 15/100
OAI/OpenAPI-Specification#5554 ·
-
Housekeeping
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 25/100
OAI/OpenAPI-Specification#5542 · 8 Kommentare ·
-
Housekeeping
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 25/100
OAI/OpenAPI-Specification#5532 · 4 Kommentare ·
-
v3.2.1 release Offen
OAI/OpenAPI-Specification#5460 · 11 Kommentare · 1 Reaktion · 1 zugewiesene Person ·
-
param serialization
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
OAI/OpenAPI-Specification#5366 · 12 Kommentare ·
Alle Issues in OAI/OpenAPI-Specification
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
code-quality refactoring
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
github/gh-aw-firewall#8816 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
getgrav/grav-plugin-api#45 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
langchain-ai/deepagents#6450 ·