Skip to content

Commit

Permalink
🐛 fix label description schema incorrect (fix #7)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu committed Nov 4, 2022
1 parent 5073944 commit a8bdc2b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion codegen/parser/schemas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion githubkit/rest/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=...)

Expand Down
2 changes: 1 addition & 1 deletion githubkit/rest/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -4698,7 +4698,7 @@ class PullRequestSimplePropLabelsItemsType(TypedDict):
node_id: str
url: str
name: str
description: str
description: Union[str, None]
color: str
default: bool

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit a8bdc2b

Please sign in to comment.