Open
Description
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.