Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
Open
@alexeyinkin

Description

@alexeyinkin
Issue body actions

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.