diff --git a/codegen/parser/schemas/__init__.py b/codegen/parser/schemas/__init__.py index c6a347cd..9a983bdf 100644 --- a/codegen/parser/schemas/__init__.py +++ b/codegen/parser/schemas/__init__.py @@ -29,7 +29,7 @@ def parse_schema( data = source.data try: if overrides := get_schema_override(source): - data = merge_dict(data, overrides) + merge_dict(data, overrides) data = parse_obj_as(Union[oas.Reference, oas.Schema], data) except Exception as e: raise TypeError(f"Invalid Schema from {source.uri}") from e diff --git a/githubkit/rest/models.py b/githubkit/rest/models.py index 44b1a9df..16afada1 100644 --- a/githubkit/rest/models.py +++ b/githubkit/rest/models.py @@ -6569,7 +6569,7 @@ class PullRequestSimplePropLabelsItems(GitHubRestModel): node_id: str = Field(default=...) url: str = Field(default=...) name: str = Field(default=...) - description: str = Field(default=...) + description: Union[str, None] = Field(default=...) color: str = Field(default=...) default: bool = Field(default=...) diff --git a/githubkit/rest/types.py b/githubkit/rest/types.py index e39896e0..06531e66 100644 --- a/githubkit/rest/types.py +++ b/githubkit/rest/types.py @@ -4698,7 +4698,7 @@ class PullRequestSimplePropLabelsItemsType(TypedDict): node_id: str url: str name: str - description: str + description: Union[str, None] color: str default: bool diff --git a/pyproject.toml b/pyproject.toml index 1dea34c7..f9e0edaa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -107,6 +107,9 @@ webhook-types-output = "githubkit/webhooks/types.py" { "$ref" = "#/components/schemas/repository" } ], "$ref" = {} } +# https://github.com/github/rest-api-description/issues/1812 +"/components/schemas/pull-request-simple/properties/labels/items/properties/description" = { type = ["string", "null"] } + [build-system] requires = ["poetry_core>=1.0.0"]