Closed
Description
Schema Inaccuracy
Responses for repos/get-content
operation should be more accurate.
Expected
-
The
"type"
property for responses inrepos/get-content
(content-directory
,content-file
,content-symlink
,content-submodule
) should be defined with its corresponding literal instead of accepting a typestring
. -
"title"
and"description"
forcontent-submodule
are wrong
content-directory: {
title: "Content Directory",
description: "A list of directory items",
type: "array",
items: {
type: "object",
properties: {
type: {
type: "string"
+ enum: ["dir"]
},
...
content-file: {
title: "Content File",
description: "Content File",
type: "object",
properties: {
type: {
type: "string"
+ enum: ["file"]
},
...
content-symlink: {
title: "Symlink Content",
description: "An object describing a symlink",
type: "object",
properties: {
type: {
type: "string"
+ enum: ["symlink"]
},
...
content-submodule: {
- title: "Symlink Content",
+ title: "Submodule Content",
- description: "An object describing a symlink",
+ description: "An object describing a submodule",
type: "object",
properties: {
type: {
type: "string"
+ enum: ["submodule"]
},
...
GitHub Docs reference: https://docs.github.com/en/rest/reference/repos#get-repository-content
Reproduction Steps
Linking this issue from Octokit where this becomes a TypeScript problem: https://github.com/octokit/rest.js/issues/1971#issuecomment-759693838