Skip to content

Wrong schema for installation permission literal #189

@keu

Description

@keu

After iterating over async_list_installations_for_authenticated_user result I encountered the following error:

  File "/usr/local/lib/python3.12/site-packages/githubkit/response.py", line 94, in parsed_data

    return type_validate_json(self._data_model, self.content)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.12/site-packages/githubkit/compat.py", line 43, in type_validate_json

    return TypeAdapter(type_).validate_json(data)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.12/site-packages/pydantic/type_adapter.py", line 135, in wrapped

    return func(self, *args, **kwargs)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.12/site-packages/pydantic/type_adapter.py", line 384, in validate_json

    return self.validator.validate_json(data, strict=strict, context=context)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

pydantic_core._pydantic_core.ValidationError: 2 validation errors for UserInstallationsGetResponse200

installations.0.permissions.organization_copilot_seat_management.literal[<UNSET>]

  Input should be <UNSET> [type=literal_error, input_value='read', input_type=str]

    For further information visit https://errors.pydantic.dev/2.9/v/literal_error

installations.0.permissions.organization_copilot_seat_management.literal['write']

  Input should be 'write' [type=literal_error, input_value='read', input_type=str]

    For further information visit https://errors.pydantic.dev/2.9/v/literal_error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Rest APIbugSomething isn't workingschemaschema related

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions