[Schema Inaccuracy] Wrong typed `default` values are used in `string` type.

Open
#3,878 5 comments 4 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

Assessment

This issue has not been assessed yet.

Description

feature inaccuracy

Schema Inaccuracy

{
  "type": "string",
  "description": "Specifies whether this release should be set as the latest release for the repository. Drafts and prereleases cannot be set as latest. Defaults to `true` for newly published releases. `legacy` specifies that the latest release should be determined based on the release creation date and higher semantic version.",
  "enum": [
    "true",
    "false",
    "legacy"
  ],
  "default": true
}

The default value must be "true" considering its type and enum properties, but boolean value being used.

Here is the detailed paths:

  • "$input.paths[\"/repos/{owner}/{repo}/releases\"].post.requestBody.content[\"application/json\"].schema.properties.make_latest[\"default\"]"
  • "$input.paths[\"/repos/{owner}/{repo}/releases/{release_id}\"].patch.requestBody.content[\"application/json\"].schema.properties.make_latest[\"default\"]"

Expected

Change the true default value to "true" as string type.

Reproduction Steps

Visit one of below link, and click "execute" button. Then Github OpenAPI documents would be validated.

Screenshot

Dominant language
No language data
Stars
1.6k
Forks
342
Avg merge
3h 33m
Merged PRs (30d)
51

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/rest-api-description

All issues in github/rest-api-description

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.