Skip to content

Fix: copilot seat details schema fixed#68

Merged
yanyongyu merged 3 commits into
yanyongyu:masterfrom
jecluis:wip-fix-failed-build
Dec 19, 2023
Merged

Fix: copilot seat details schema fixed#68
yanyongyu merged 3 commits into
yanyongyu:masterfrom
jecluis:wip-fix-failed-build

Conversation

@jecluis

@jecluis jecluis commented Dec 18, 2023

Copy link
Copy Markdown
Contributor

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 (620e08f), 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.

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>
@yanyongyu

Copy link
Copy Markdown
Owner

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

@jecluis

jecluis commented Dec 18, 2023

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Owner

It seems this is caused by

githubkit/pyproject.toml

Lines 226 to 231 in 620e08f

# copilot-seat-details/assignee is not valid
"/components/schemas/copilot-seat-details/properties/assignee" = { enum = "<unset>", oneOf = [
{ "$ref" = "#/components/schemas/simple-user" },
{ "$ref" = "#/components/schemas/team" },
{ "$ref" = "#/components/schemas/organization" },
] }

@yanyongyu yanyongyu added bug Something isn't working schema schema related Rest API labels Dec 19, 2023
@yanyongyu yanyongyu changed the title 🐛 fix: key does not exist on del in merge_dict Fix: copilot seat details schema fixed Dec 19, 2023

@yanyongyu yanyongyu left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems codegen is successful now 👍🏻 (My gh codespace OOM again and again)

@yanyongyu yanyongyu merged commit 348fa20 into yanyongyu:master Dec 19, 2023
@jecluis

jecluis commented Dec 19, 2023

Copy link
Copy Markdown
Contributor Author

@yanyongyu thank you for all your work on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Rest API schema schema related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants