Skip to content

[Schema Inaccuracy] Pull Request Simple Head repo label field may be null #5561

@bigfootjon

Description

@bigfootjon

Schema Inaccuracy
The Pull Request Simple object field head.repo may be null if user has deleted the repo, as the Pull Request object.

schemas:

incorrect

pull-request-simple:
type: object
title: Pull Request Simple
properties:
head:
type: object
properties:
repo:
"$ref": "#/components/schemas/repository"

correct

pull-request:
type: object
title: Pull Request
properties:
...
head:
type: object
properties:
repo:
type:
- object
- 'null'
Expected
change the repo field to oneof repository / type: null

Reproduction Steps
list pull request using curl -X GET https://api.github.com/repos/apache/pulsar/pulls?state=open

get pull request apache/pulsar#6036 which head repo was deleted

Related to yanyongyu/githubkit#6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions