yanyongyu / githubkit

The modern, all-batteries-included GitHub SDK for Python, including rest api, graphql, webhooks, like octokit!
MIT License
158 stars 21 forks source link

Fix: `copilot seat details` schema fixed #68

Closed jecluis closed 6 months ago

jecluis commented 6 months ago

While parsing OpenAPI spec for 2022-11-28:

  codegen/parser/utils.py", line 105, in merge_dict
    del old[key]
        ~~~^^^^^
  KeyError: 'enum'

Signed-off-by: Joao Eduardo Luis \joao@1e3ms.io

P.S.: This was hit while running python -m codegen on the current master branch (620e08f26274c6fd51339078c4fbfd29c80e702f), which was surprising. I'm not ruling out this might be a problem with my environment, but I suspect this might be a corner case somewhere with the schema.

yanyongyu commented 6 months ago

This is caused by schema update made by GitHub. This should be fixed in the schema override part in the pyproject.toml file.

jecluis commented 6 months ago

This is caused by schema update made by GitHub. This should be fixed in the schema override part in the pyproject.toml file.

I suspected that could be the case as well. Any idea which schema bit is triggering this? Happy to open a PR to address it.

Also, feel free to close this one if not the right path to address the problem :)

yanyongyu commented 6 months ago

It seems this is caused by https://github.com/yanyongyu/githubkit/blob/620e08f26274c6fd51339078c4fbfd29c80e702f/pyproject.toml#L226-L231

jecluis commented 6 months ago

@yanyongyu thank you for all your work on this!