Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Schema Inaccuracy] Event.type should be an enum #1964

Open
alexeyinkin opened this issue Dec 10, 2022 · 0 comments
Open

[Schema Inaccuracy] Event.type should be an enum #1964

alexeyinkin opened this issue Dec 10, 2022 · 0 comments

Comments

@alexeyinkin
Copy link

alexeyinkin commented Dec 10, 2022

Schema Inaccuracy

Event.type should be an enum.

This request returns events for a user:
https://docs.github.com/en/rest/activity/events?apiVersion=2022-11-28#list-events-for-the-authenticated-user

The example response hints that some options for an event type are WatchEvent and PushEvent, and there are probably more.

Expected

The nature of this field suggests that being a closed set and so it should be an enum.

Reproduction Steps

The field is defined as an ordinary string here:
https://github.com/github/rest-api-description/blob/main/descriptions/ghes-3.7/ghes-3.7.yaml?raw=true
at line 59676 as of revision d25cb45 (don't know how to generate a permalink on files that large).

Not really an inaccuracy, but it prevents compile-time safety when sorting out events.

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

No branches or pull requests

2 participants