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] Mismatch between the response schema and response example for "List repository security advisories" API call #2902

Open
anishrajan25 opened this issue Aug 20, 2023 · 4 comments

Comments

@anishrajan25
Copy link

Schema Inaccuracy

As per the response schema for:

the submission field's schema is as follows:

"submission": {
        "type": [
          "object",
          "null"
        ],
        "readOnly": true,
        "properties": {
          "accepted": {
            "type": "boolean",
            "description": "Whether a private vulnerability report was accepted by the repository's administrators.",
            "readOnly": true
          }
        },
        "required": [
          "accepted"
        ]
      }

i.e. the submission field in the response should be as follows:

"submission": {
    "accepted": true
}

But the response example for both these API calls have the submission field as:

"submission": [
      {
        "accepted": true
      }
    ]

Screenshot from official documentation:
image

Expected

The response example for both the above API calls should have the submission field as:

"submission": {
    "accepted": true
}

For the Report a security vulnerability (/repos/{owner}/{repo}/security-advisories/reports) API call, the submission field's schema is the same as above 2 API calls but the response example has the submission field in correct format.

image

Reproduction Steps

Since this is an issue with documentation, there no requirement for reproducing anything.

@anishrajan25
Copy link
Author

This would need the documentation to be updated. I can take up the task for fixing the documentation as well.

@anishrajan25
Copy link
Author

Just checked the CONTRIBUTING.md and got to know that the description artifacts cannot be directly modified.

@anishrajan25
Copy link
Author

@bearcherian So the correct schema for submission field is as per the response schema, right? i.e.:

"submission": {
    "accepted": true
}

@KateCatlin
Copy link

Hey @anishrajan25 we cleaned up this discrepancy in the docs here! https://github.com/github/github/pull/293752#issuecomment-1773261901

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

3 participants