diff --git a/codegen/parser/__init__.py b/codegen/parser/__init__.py index 860ad485f..1b528e322 100644 --- a/codegen/parser/__init__.py +++ b/codegen/parser/__init__.py @@ -56,7 +56,7 @@ def parse_openapi_spec(source: "Source", override: "Override") -> OpenAPIData: for path, new_schema in override.schema_overrides.items(): ref = str(httpx.URL(fragment=path)) logger.info(f"Applying schema override for {ref!r}") - merge_inplace(source.resolve_ref(ref).data, new_schema) + merge_inplace(source.resolve_ref(ref), new_schema) _ot = _override_config.set(override) _st = _schemas.set({}) diff --git a/codegen/parser/utils.py b/codegen/parser/utils.py index 91fa607d0..c823dafb0 100644 --- a/codegen/parser/utils.py +++ b/codegen/parser/utils.py @@ -23,6 +23,7 @@ "id", } +COPY_KEY = "" UNSET_KEY = "" ADD_KEY = "" REMOVE_KEY = "" @@ -102,7 +103,19 @@ def build_prop_name(name: str) -> str: return fix_reserved_words(snake_case(name)) -def merge_dict(old: dict, new: dict): +def _handle_copy(source: "Source", new: dict): + if COPY_KEY not in new: + return + copy_from = new.pop(COPY_KEY) + if not isinstance(copy_from, str): + raise TypeError(f"{COPY_KEY} value must be a reference string") + copy_source = source.resolve_ref(copy_from) + target_name = source.pointer.parts[-1] + source.parent.data[target_name] = copy_source.data + + +def merge_dict(source: "Source", new: dict): + old = source.data # make change inplace to make json point correct for key, value in new.items(): # remove a field @@ -115,12 +128,13 @@ def merge_dict(old: dict, new: dict): old[key] = value else: try: - merge_inplace(old[key], value) + merge_inplace(source / key, value) except TypeError: old[key] = value -def merge_list(old: list, new: list | dict): +def merge_list(source: "Source", new: list | dict): + old = source.data if isinstance(new, list): old.clear() old.extend(new) @@ -132,13 +146,16 @@ def merge_list(old: list, new: list | dict): old.extend(new[ADD_KEY]) -def merge_inplace(old: Any, new: Any): - if isinstance(old, dict) and isinstance(new, dict): - merge_dict(old, new) - elif isinstance(old, list) and isinstance(new, list | dict): - merge_list(old, new) +def merge_inplace(source: "Source", new: Any): + if isinstance(new, dict): + _handle_copy(source, new) + + if isinstance(source.data, dict) and isinstance(new, dict): + merge_dict(source, new) + elif isinstance(source.data, list) and isinstance(new, list | dict): + merge_list(source, new) else: - raise TypeError(f"Cannot merge type {type(old)} with {type(new)}") + raise TypeError(f"Cannot merge type {type(source.data)} with {type(new)}") def schema_from_source(source: "Source") -> oas.Schema: diff --git a/codegen/source.py b/codegen/source.py index 8f533125e..ae37900c0 100644 --- a/codegen/source.py +++ b/codegen/source.py @@ -29,6 +29,14 @@ def pointer(self) -> JsonPointer: def data(self) -> Any: return self.pointer.resolve(self.root) + @property + def parent(self) -> "Source": + parts = self.pointer.get_parts() + if not parts: + raise ValueError("Root source has no parent") + fragment = JsonPointer.from_parts(parts[:-1]).path + return self.resolve_ref(str(httpx.URL(fragment=fragment))) + def get_root(self: "Source") -> "Source": return Source(uri=self.uri.copy_with(fragment=""), root=self.root) diff --git a/docs/contributing.md b/docs/contributing.md index f81c3f050..e4e3c7d57 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -36,7 +36,7 @@ If you encounter an schema error, you can patch the schema by modifying the `pyp In the `[tool.codegen.overrides.schema_overrides]` section, you can modify the schema using json pointer. The value will override the original schema. -Specially, if the json pointer points to a dictionary, you can use special value `` to remove the key from the dictionary. If the json pointer points to a array, you can use a list value to replace the original array. Or you can use a dict with key `` and `` to add or remove items from the array. +Specially, if the json pointer points to a dictionary, you can use special value `` to remove the key from the dictionary. If the json pointer points to a array, you can use a list value to replace the original array. Or you can use a dict with key `` and `` to add or remove items from the array. For any json pointer, you can use a dict with key "" to replace the pointer data by the value pointer's data. Please add a comment to explain the reason for the patch if you want to submit a PR. diff --git a/githubkit/versions/ghec_v2022_11_28/models/group_0644.py b/githubkit/versions/ghec_v2022_11_28/models/group_0644.py index 7c2b1d015..89210e76c 100644 --- a/githubkit/versions/ghec_v2022_11_28/models/group_0644.py +++ b/githubkit/versions/ghec_v2022_11_28/models/group_0644.py @@ -36,7 +36,7 @@ class WebhookCodeScanningAlertReopenedPropAlert(GitHubModel): ) dismissed_by: Union[ WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy, None - ] = Field() + ] = Field(title="User") dismissed_comment: Missing[Union[Annotated[str, Field(max_length=280)], None]] = ( Field( default=UNSET, @@ -67,7 +67,30 @@ class WebhookCodeScanningAlertReopenedPropAlert(GitHubModel): class WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy(GitHubModel): - """WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy""" + """User""" + + avatar_url: Missing[str] = Field(default=UNSET) + deleted: Missing[bool] = Field(default=UNSET) + email: Missing[Union[str, None]] = Field(default=UNSET) + events_url: Missing[str] = Field(default=UNSET) + followers_url: Missing[str] = Field(default=UNSET) + following_url: Missing[str] = Field(default=UNSET) + gists_url: Missing[str] = Field(default=UNSET) + gravatar_id: Missing[str] = Field(default=UNSET) + html_url: Missing[str] = Field(default=UNSET) + id: int = Field() + login: str = Field() + name: Missing[str] = Field(default=UNSET) + node_id: Missing[str] = Field(default=UNSET) + organizations_url: Missing[str] = Field(default=UNSET) + received_events_url: Missing[str] = Field(default=UNSET) + repos_url: Missing[str] = Field(default=UNSET) + site_admin: Missing[bool] = Field(default=UNSET) + starred_url: Missing[str] = Field(default=UNSET) + subscriptions_url: Missing[str] = Field(default=UNSET) + type: Missing[Literal["Bot", "User", "Organization"]] = Field(default=UNSET) + url: Missing[str] = Field(default=UNSET) + user_view_type: Missing[str] = Field(default=UNSET) class WebhookCodeScanningAlertReopenedPropAlertPropMostRecentInstance(GitHubModel): diff --git a/githubkit/versions/ghec_v2022_11_28/types/group_0644.py b/githubkit/versions/ghec_v2022_11_28/types/group_0644.py index 53ad19146..8fcc92699 100644 --- a/githubkit/versions/ghec_v2022_11_28/types/group_0644.py +++ b/githubkit/versions/ghec_v2022_11_28/types/group_0644.py @@ -78,13 +78,59 @@ class WebhookCodeScanningAlertReopenedPropAlertTypeForResponse(TypedDict): class WebhookCodeScanningAlertReopenedPropAlertPropDismissedByType(TypedDict): - """WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy""" + """User""" + + avatar_url: NotRequired[str] + deleted: NotRequired[bool] + email: NotRequired[Union[str, None]] + events_url: NotRequired[str] + followers_url: NotRequired[str] + following_url: NotRequired[str] + gists_url: NotRequired[str] + gravatar_id: NotRequired[str] + html_url: NotRequired[str] + id: int + login: str + name: NotRequired[str] + node_id: NotRequired[str] + organizations_url: NotRequired[str] + received_events_url: NotRequired[str] + repos_url: NotRequired[str] + site_admin: NotRequired[bool] + starred_url: NotRequired[str] + subscriptions_url: NotRequired[str] + type: NotRequired[Literal["Bot", "User", "Organization"]] + url: NotRequired[str] + user_view_type: NotRequired[str] class WebhookCodeScanningAlertReopenedPropAlertPropDismissedByTypeForResponse( TypedDict ): - """WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy""" + """User""" + + avatar_url: NotRequired[str] + deleted: NotRequired[bool] + email: NotRequired[Union[str, None]] + events_url: NotRequired[str] + followers_url: NotRequired[str] + following_url: NotRequired[str] + gists_url: NotRequired[str] + gravatar_id: NotRequired[str] + html_url: NotRequired[str] + id: int + login: str + name: NotRequired[str] + node_id: NotRequired[str] + organizations_url: NotRequired[str] + received_events_url: NotRequired[str] + repos_url: NotRequired[str] + site_admin: NotRequired[bool] + starred_url: NotRequired[str] + subscriptions_url: NotRequired[str] + type: NotRequired[Literal["Bot", "User", "Organization"]] + url: NotRequired[str] + user_view_type: NotRequired[str] class WebhookCodeScanningAlertReopenedPropAlertPropMostRecentInstanceType(TypedDict): diff --git a/githubkit/versions/ghec_v2026_03_10/models/group_0643.py b/githubkit/versions/ghec_v2026_03_10/models/group_0643.py index 7c2b1d015..89210e76c 100644 --- a/githubkit/versions/ghec_v2026_03_10/models/group_0643.py +++ b/githubkit/versions/ghec_v2026_03_10/models/group_0643.py @@ -36,7 +36,7 @@ class WebhookCodeScanningAlertReopenedPropAlert(GitHubModel): ) dismissed_by: Union[ WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy, None - ] = Field() + ] = Field(title="User") dismissed_comment: Missing[Union[Annotated[str, Field(max_length=280)], None]] = ( Field( default=UNSET, @@ -67,7 +67,30 @@ class WebhookCodeScanningAlertReopenedPropAlert(GitHubModel): class WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy(GitHubModel): - """WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy""" + """User""" + + avatar_url: Missing[str] = Field(default=UNSET) + deleted: Missing[bool] = Field(default=UNSET) + email: Missing[Union[str, None]] = Field(default=UNSET) + events_url: Missing[str] = Field(default=UNSET) + followers_url: Missing[str] = Field(default=UNSET) + following_url: Missing[str] = Field(default=UNSET) + gists_url: Missing[str] = Field(default=UNSET) + gravatar_id: Missing[str] = Field(default=UNSET) + html_url: Missing[str] = Field(default=UNSET) + id: int = Field() + login: str = Field() + name: Missing[str] = Field(default=UNSET) + node_id: Missing[str] = Field(default=UNSET) + organizations_url: Missing[str] = Field(default=UNSET) + received_events_url: Missing[str] = Field(default=UNSET) + repos_url: Missing[str] = Field(default=UNSET) + site_admin: Missing[bool] = Field(default=UNSET) + starred_url: Missing[str] = Field(default=UNSET) + subscriptions_url: Missing[str] = Field(default=UNSET) + type: Missing[Literal["Bot", "User", "Organization"]] = Field(default=UNSET) + url: Missing[str] = Field(default=UNSET) + user_view_type: Missing[str] = Field(default=UNSET) class WebhookCodeScanningAlertReopenedPropAlertPropMostRecentInstance(GitHubModel): diff --git a/githubkit/versions/ghec_v2026_03_10/types/group_0643.py b/githubkit/versions/ghec_v2026_03_10/types/group_0643.py index 53ad19146..8fcc92699 100644 --- a/githubkit/versions/ghec_v2026_03_10/types/group_0643.py +++ b/githubkit/versions/ghec_v2026_03_10/types/group_0643.py @@ -78,13 +78,59 @@ class WebhookCodeScanningAlertReopenedPropAlertTypeForResponse(TypedDict): class WebhookCodeScanningAlertReopenedPropAlertPropDismissedByType(TypedDict): - """WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy""" + """User""" + + avatar_url: NotRequired[str] + deleted: NotRequired[bool] + email: NotRequired[Union[str, None]] + events_url: NotRequired[str] + followers_url: NotRequired[str] + following_url: NotRequired[str] + gists_url: NotRequired[str] + gravatar_id: NotRequired[str] + html_url: NotRequired[str] + id: int + login: str + name: NotRequired[str] + node_id: NotRequired[str] + organizations_url: NotRequired[str] + received_events_url: NotRequired[str] + repos_url: NotRequired[str] + site_admin: NotRequired[bool] + starred_url: NotRequired[str] + subscriptions_url: NotRequired[str] + type: NotRequired[Literal["Bot", "User", "Organization"]] + url: NotRequired[str] + user_view_type: NotRequired[str] class WebhookCodeScanningAlertReopenedPropAlertPropDismissedByTypeForResponse( TypedDict ): - """WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy""" + """User""" + + avatar_url: NotRequired[str] + deleted: NotRequired[bool] + email: NotRequired[Union[str, None]] + events_url: NotRequired[str] + followers_url: NotRequired[str] + following_url: NotRequired[str] + gists_url: NotRequired[str] + gravatar_id: NotRequired[str] + html_url: NotRequired[str] + id: int + login: str + name: NotRequired[str] + node_id: NotRequired[str] + organizations_url: NotRequired[str] + received_events_url: NotRequired[str] + repos_url: NotRequired[str] + site_admin: NotRequired[bool] + starred_url: NotRequired[str] + subscriptions_url: NotRequired[str] + type: NotRequired[Literal["Bot", "User", "Organization"]] + url: NotRequired[str] + user_view_type: NotRequired[str] class WebhookCodeScanningAlertReopenedPropAlertPropMostRecentInstanceType(TypedDict): diff --git a/githubkit/versions/v2022_11_28/models/group_0553.py b/githubkit/versions/v2022_11_28/models/group_0553.py index 7c2b1d015..89210e76c 100644 --- a/githubkit/versions/v2022_11_28/models/group_0553.py +++ b/githubkit/versions/v2022_11_28/models/group_0553.py @@ -36,7 +36,7 @@ class WebhookCodeScanningAlertReopenedPropAlert(GitHubModel): ) dismissed_by: Union[ WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy, None - ] = Field() + ] = Field(title="User") dismissed_comment: Missing[Union[Annotated[str, Field(max_length=280)], None]] = ( Field( default=UNSET, @@ -67,7 +67,30 @@ class WebhookCodeScanningAlertReopenedPropAlert(GitHubModel): class WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy(GitHubModel): - """WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy""" + """User""" + + avatar_url: Missing[str] = Field(default=UNSET) + deleted: Missing[bool] = Field(default=UNSET) + email: Missing[Union[str, None]] = Field(default=UNSET) + events_url: Missing[str] = Field(default=UNSET) + followers_url: Missing[str] = Field(default=UNSET) + following_url: Missing[str] = Field(default=UNSET) + gists_url: Missing[str] = Field(default=UNSET) + gravatar_id: Missing[str] = Field(default=UNSET) + html_url: Missing[str] = Field(default=UNSET) + id: int = Field() + login: str = Field() + name: Missing[str] = Field(default=UNSET) + node_id: Missing[str] = Field(default=UNSET) + organizations_url: Missing[str] = Field(default=UNSET) + received_events_url: Missing[str] = Field(default=UNSET) + repos_url: Missing[str] = Field(default=UNSET) + site_admin: Missing[bool] = Field(default=UNSET) + starred_url: Missing[str] = Field(default=UNSET) + subscriptions_url: Missing[str] = Field(default=UNSET) + type: Missing[Literal["Bot", "User", "Organization"]] = Field(default=UNSET) + url: Missing[str] = Field(default=UNSET) + user_view_type: Missing[str] = Field(default=UNSET) class WebhookCodeScanningAlertReopenedPropAlertPropMostRecentInstance(GitHubModel): diff --git a/githubkit/versions/v2022_11_28/types/group_0553.py b/githubkit/versions/v2022_11_28/types/group_0553.py index 53ad19146..8fcc92699 100644 --- a/githubkit/versions/v2022_11_28/types/group_0553.py +++ b/githubkit/versions/v2022_11_28/types/group_0553.py @@ -78,13 +78,59 @@ class WebhookCodeScanningAlertReopenedPropAlertTypeForResponse(TypedDict): class WebhookCodeScanningAlertReopenedPropAlertPropDismissedByType(TypedDict): - """WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy""" + """User""" + + avatar_url: NotRequired[str] + deleted: NotRequired[bool] + email: NotRequired[Union[str, None]] + events_url: NotRequired[str] + followers_url: NotRequired[str] + following_url: NotRequired[str] + gists_url: NotRequired[str] + gravatar_id: NotRequired[str] + html_url: NotRequired[str] + id: int + login: str + name: NotRequired[str] + node_id: NotRequired[str] + organizations_url: NotRequired[str] + received_events_url: NotRequired[str] + repos_url: NotRequired[str] + site_admin: NotRequired[bool] + starred_url: NotRequired[str] + subscriptions_url: NotRequired[str] + type: NotRequired[Literal["Bot", "User", "Organization"]] + url: NotRequired[str] + user_view_type: NotRequired[str] class WebhookCodeScanningAlertReopenedPropAlertPropDismissedByTypeForResponse( TypedDict ): - """WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy""" + """User""" + + avatar_url: NotRequired[str] + deleted: NotRequired[bool] + email: NotRequired[Union[str, None]] + events_url: NotRequired[str] + followers_url: NotRequired[str] + following_url: NotRequired[str] + gists_url: NotRequired[str] + gravatar_id: NotRequired[str] + html_url: NotRequired[str] + id: int + login: str + name: NotRequired[str] + node_id: NotRequired[str] + organizations_url: NotRequired[str] + received_events_url: NotRequired[str] + repos_url: NotRequired[str] + site_admin: NotRequired[bool] + starred_url: NotRequired[str] + subscriptions_url: NotRequired[str] + type: NotRequired[Literal["Bot", "User", "Organization"]] + url: NotRequired[str] + user_view_type: NotRequired[str] class WebhookCodeScanningAlertReopenedPropAlertPropMostRecentInstanceType(TypedDict): diff --git a/githubkit/versions/v2026_03_10/models/group_0552.py b/githubkit/versions/v2026_03_10/models/group_0552.py index 7c2b1d015..89210e76c 100644 --- a/githubkit/versions/v2026_03_10/models/group_0552.py +++ b/githubkit/versions/v2026_03_10/models/group_0552.py @@ -36,7 +36,7 @@ class WebhookCodeScanningAlertReopenedPropAlert(GitHubModel): ) dismissed_by: Union[ WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy, None - ] = Field() + ] = Field(title="User") dismissed_comment: Missing[Union[Annotated[str, Field(max_length=280)], None]] = ( Field( default=UNSET, @@ -67,7 +67,30 @@ class WebhookCodeScanningAlertReopenedPropAlert(GitHubModel): class WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy(GitHubModel): - """WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy""" + """User""" + + avatar_url: Missing[str] = Field(default=UNSET) + deleted: Missing[bool] = Field(default=UNSET) + email: Missing[Union[str, None]] = Field(default=UNSET) + events_url: Missing[str] = Field(default=UNSET) + followers_url: Missing[str] = Field(default=UNSET) + following_url: Missing[str] = Field(default=UNSET) + gists_url: Missing[str] = Field(default=UNSET) + gravatar_id: Missing[str] = Field(default=UNSET) + html_url: Missing[str] = Field(default=UNSET) + id: int = Field() + login: str = Field() + name: Missing[str] = Field(default=UNSET) + node_id: Missing[str] = Field(default=UNSET) + organizations_url: Missing[str] = Field(default=UNSET) + received_events_url: Missing[str] = Field(default=UNSET) + repos_url: Missing[str] = Field(default=UNSET) + site_admin: Missing[bool] = Field(default=UNSET) + starred_url: Missing[str] = Field(default=UNSET) + subscriptions_url: Missing[str] = Field(default=UNSET) + type: Missing[Literal["Bot", "User", "Organization"]] = Field(default=UNSET) + url: Missing[str] = Field(default=UNSET) + user_view_type: Missing[str] = Field(default=UNSET) class WebhookCodeScanningAlertReopenedPropAlertPropMostRecentInstance(GitHubModel): diff --git a/githubkit/versions/v2026_03_10/types/group_0552.py b/githubkit/versions/v2026_03_10/types/group_0552.py index 53ad19146..8fcc92699 100644 --- a/githubkit/versions/v2026_03_10/types/group_0552.py +++ b/githubkit/versions/v2026_03_10/types/group_0552.py @@ -78,13 +78,59 @@ class WebhookCodeScanningAlertReopenedPropAlertTypeForResponse(TypedDict): class WebhookCodeScanningAlertReopenedPropAlertPropDismissedByType(TypedDict): - """WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy""" + """User""" + + avatar_url: NotRequired[str] + deleted: NotRequired[bool] + email: NotRequired[Union[str, None]] + events_url: NotRequired[str] + followers_url: NotRequired[str] + following_url: NotRequired[str] + gists_url: NotRequired[str] + gravatar_id: NotRequired[str] + html_url: NotRequired[str] + id: int + login: str + name: NotRequired[str] + node_id: NotRequired[str] + organizations_url: NotRequired[str] + received_events_url: NotRequired[str] + repos_url: NotRequired[str] + site_admin: NotRequired[bool] + starred_url: NotRequired[str] + subscriptions_url: NotRequired[str] + type: NotRequired[Literal["Bot", "User", "Organization"]] + url: NotRequired[str] + user_view_type: NotRequired[str] class WebhookCodeScanningAlertReopenedPropAlertPropDismissedByTypeForResponse( TypedDict ): - """WebhookCodeScanningAlertReopenedPropAlertPropDismissedBy""" + """User""" + + avatar_url: NotRequired[str] + deleted: NotRequired[bool] + email: NotRequired[Union[str, None]] + events_url: NotRequired[str] + followers_url: NotRequired[str] + following_url: NotRequired[str] + gists_url: NotRequired[str] + gravatar_id: NotRequired[str] + html_url: NotRequired[str] + id: int + login: str + name: NotRequired[str] + node_id: NotRequired[str] + organizations_url: NotRequired[str] + received_events_url: NotRequired[str] + repos_url: NotRequired[str] + site_admin: NotRequired[bool] + starred_url: NotRequired[str] + subscriptions_url: NotRequired[str] + type: NotRequired[Literal["Bot", "User", "Organization"]] + url: NotRequired[str] + user_view_type: NotRequired[str] class WebhookCodeScanningAlertReopenedPropAlertPropMostRecentInstanceType(TypedDict): diff --git a/githubkit/versions/versions.lock b/githubkit/versions/versions.lock index 834038316..a3b74c9a4 100644 --- a/githubkit/versions/versions.lock +++ b/githubkit/versions/versions.lock @@ -162,6 +162,7 @@ source = "https://raw.githubusercontent.com/github/rest-api-description/d5aff63f "/components/schemas/webhook-code-scanning-alert-reopened/properties/alert/properties/fixed_at" = {type = ["string", "null"], format = "date-time"} "/components/schemas/webhook-code-scanning-alert-reopened-by-user/properties/alert/properties/fixed_at" = {type = ["string", "null"], format = "date-time"} "/components/schemas/webhook-code-scanning-alert-updated-assignment/properties/alert/properties/fixed_at" = {type = ["string", "null"], format = "date-time"} +"/components/schemas/webhook-code-scanning-alert-reopened/properties/alert/properties/dismissed_by" = {"" = "#/components/schemas/webhook-code-scanning-alert-appeared-in-branch/properties/alert/properties/dismissed_by"} "/webhooks/repository-dispatch-sample.collected/post" = {operationId = "repository-dispatch"} "/components/schemas/webhooks_answer/properties/parent_id" = {type = ["integer", "null"]} "/components/schemas/dependabot-alert-with-repository/properties/dependency/properties/relationship/enum" = {"" = ["inconclusive"]} diff --git a/pyproject.toml b/pyproject.toml index 40a3c1580..877b6fc82 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -599,6 +599,10 @@ source = "descriptions-next/ghec/ghec.2026-03-10.json" "null", ], format = "date-time" } +# https://github.com/yanyongyu/githubkit/issues/283 +# https://github.com/github/rest-api-description/issues/6107 +"/components/schemas/webhook-code-scanning-alert-reopened/properties/alert/properties/dismissed_by" = { "" = "#/components/schemas/webhook-code-scanning-alert-appeared-in-branch/properties/alert/properties/dismissed_by" } + # webhook repository dispatch action can be any string "/webhooks/repository-dispatch-sample.collected/post" = { operationId = "repository-dispatch" } # "/components/schemas/webhook-repository-dispatch-sample/properties/action" = { enum = "" }