You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
payload:
oneOf:
- type: objectadditionalProperties: true
- type: stringdescription: JSON payload with extra information about the deployment.default: ''
Both represent the type: object aspect, but ignore additionalProperties: true. This makes the field useless (as they only allow to encode an empty json object).
I am not so sure about ReposOwnerRepoDeploymentsPostBodyPropPayloadOneof0Type. I think, it needs to be encoded as a normal dict[str, ...] as TypedDicts have currently no way to allow for extra keys.
(I can try to create a PR but I am not familiar with the code base at the moment).
The text was updated successfully, but these errors were encountered:
Actually, there is a ExtraGitHubModel can be inheritted. It allows extra fields. additional properties option is partially supported. I need to check the codegen to locate the root reason of this issue. Maybe the parser or the template cause this.
However, I only checked paths./repos/{owner}/{repo}/deployments.post.requestBody.content.application/json.schema.properties.payload (line 28964) and components.schemas.deployment.properties.payload (line 80860).
I see now that components.schemas.webhook-deployment-created.properties.deployment.properties.payload (line 106974) and components.schemas.webhook-deployment-status-created.properties.deployment.properties.payload (line 110250) indeed does not specify additionalProperties (even so they are returned if the deployment is created with them).
I checked the online documentation https://docs.github.com/en/webhooks/webhook-events-and-payloads#deployment (but they only specific object or string).
GitHub deployments API includes a
payload
field. That can be JSON payload (either as string or directly embedded).It is currently documented as:
it is currently typed as
Both represent the
type: object
aspect, but ignoreadditionalProperties: true
. This makes the field useless (as they only allow to encode an empty json object).For pydantic
extra=allow
is needed:I am not so sure about
ReposOwnerRepoDeploymentsPostBodyPropPayloadOneof0Type
. I think, it needs to be encoded as a normaldict[str, ...]
asTypedDict
s have currently no way to allow for extra keys.(I can try to create a PR but I am not familiar with the code base at the moment).
The text was updated successfully, but these errors were encountered: