Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
samchon opened this issue Aug 20, 2024 · 2 comments
Open

Comments

@samchon
Copy link

samchon commented Aug 20, 2024

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

@shawnHartsell
Copy link
Contributor

@samchon thanks for submitting the issue! I'll get this routed to the correct internal team so we can address it.

@samchon
Copy link
Author

samchon commented Nov 1, 2024

@shawnHartsell Not yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants