[Schema Inaccuracy] "contents" endpoints response seem way under-specified
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 38/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- openapi, yaml
- Bereich
- api
Rechercherichtung
Beginne mit den in der Issue beschriebenen file-commit- und content-file-Schemas und vergleiche sie anschließend mit den Antworten der PUT- und DELETE-contents-Endpunkte. Ermittle, welche Eigenschaften durchgehend vorhanden sind, ob content nur für DELETE nullable ist und ob type eingeschränkt werden sollte. Als erledigt gilt die Aufgabe, wenn die OpenAPI-Schemas beide Antwortvarianten und deren erforderliche Felder korrekt beschreiben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
The "updating "contents" endpoints (PUT, or DELETE on /repos/{owner}/{repo}/contents/{path}, but not GET) all respond with a file-commit defined thus:
file-commit:
title: File Commit
description: File Commit
type: object
required:
- content
- commit
properties:
content:
type: object
properties:
name:
type: string
path:
type: string
sha:
type: string
size:
type: integer
url:
type: string
html_url:
type: string
git_url:
type: string
download_url:
type: string
type:
type: string
_links:
type: object
properties:
self:
type: string
git:
type: string
html:
type: string
nullable: true
commit:
type: object
properties:
sha:
type: string
node_id:
type: string
url:
type: string
html_url:
type: string
author:
type: object
properties:
date:
type: string
name:
type: string
email:
type: string
committer:
type: object
properties:
date:
type: string
name:
type: string
email:
type: string
message:
type: string
tree:
type: object
properties:
url:
type: string
sha:
type: string
parents:
type: array
items:
type: object
properties:
url:
type: string
html_url:
type: string
sha:
type: string
verification:
type: object
properties:
verified:
type: boolean
reason:
type: string
signature:
type: string
nullable: true
payload:
type: string
nullable: true
So file-commit has two required properties content and commit, with the first being nullable.
It's my understanding that content is null in the case of DELETE, in the case of PUT it's present and contains the information of the just-created file.
However I don't understand in what case all the properties of a non-null content or a commit would be missing, surely most or all properties should be required, with the possible (probable?) exception of commit.verification?
All in all, file-commit.content looks like a slightly cut down version of content-file (without encoding and content), so probably should otherwise have the same schema? And for both it seems like the type field should be an enum with file as the only option?
I think file-commit.content could be something like a file type with content-file being an allOf(file, {encoding: ..., content: ...}) but I guess that increases the complexity of the schema and currently there's a single use site for allOf so that's probably a tad too much.
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 1.6k
- Forks
- 345
- Ø Merge
- 6 Std. 39 Min.
- Gemergte PRs (30 T.)
- 75
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
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 github/rest-api-description
-
feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
github/rest-api-description#7286 ·
Maintainer antworten meist innerhalb von 1 Tag
-
feature
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
github/rest-api-description#7266 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
github/rest-api-description#7246 ·
Maintainer antworten meist innerhalb von 1 Tag
-
feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
github/rest-api-description#7220 ·
Maintainer antworten meist innerhalb von 1 Tag
-
feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
github/rest-api-description#7201 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in github/rest-api-description
Ähnliche Issues
-
Executable-extension and MIME blocklist is case-sensitive; .EXE and mixed-case variants bypass itOffenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
awslabs/visual-asset-management-system#412 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[BUG] 订单:会员凭订单号即可取消其他会员的待付款订单(取消接口不校验订单归属)Evtl. vergeben @dadiyang hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
macrozheng/mall#1016 ·
-
bug v1 v2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
modelcontextprotocol/python-sdk#3670 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug pending triage scope/agent
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
zerocracy/judges-action#2739 ·
Maintainer antworten meist innerhalb von 8 Tagen