[Schema Inaccuracy] Dependabot Alert "relationship" enum is incomplete

Open
#4,727 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
openapi
Domain
api

Research direction

Start with the organization Dependabot alerts endpoint documentation and the dependabot-alert-with-repository response schema. Locate the dependency.relationship enum and verify the API's possible values, including inconclusive. Done means the schema lists all valid values and any relevant schema validation checks pass.

Written by the indexing model from the issue text.

Description

documentation

Schema Inaccuracy

The Response Schema for the dependabot alert endpoint (for organizations) defines 3 valid values for relationship. When using this endpoint we sometimes get the value "inconclusive" which is not listed.

"dependabot-alert-with-repository": {
        "type": "object",
        "description": "A Dependabot alert.",
        "properties": {
          "number": {
            "$ref": "#/components/schemas/alert-number"
          },
          "state": {
            ...
          },
          "dependency": {
            "type": "object",
            "description": "Details for the vulnerable dependency.",
            "readOnly": true,
            "properties": {
              ...
              "relationship": {
                "type": "string",
                "description": "...",
                "readOnly": true,
                "nullable": true,
                "enum": [
                  "unknown",
                  "direct",
                  "transitive"
                ]
              }
            }
          },

Expected

The schema should include all values

"dependabot-alert-with-repository": {
        "type": "object",
        "description": "A Dependabot alert.",
        "properties": {
          "number": {
            "$ref": "#/components/schemas/alert-number"
          },
          "state": {
            ...
          },
          "dependency": {
            "type": "object",
            "description": "Details for the vulnerable dependency.",
            "readOnly": true,
            "properties": {
              ...
              "relationship": {
                "type": "string",
                "description": "...",
                "readOnly": true,
                "nullable": true,
                "enum": [
                  "unknown",
                  "direct",
                  "transitive",
                  "inconclusive"
                ]
              }
            }
          },

Reproduction Steps

Due to the sensitive nature of alerts I cannot provide an explicit example.

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

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.