Skip to content

OpenAPI docs: identityname should be identity.name, and token scope admin should be global #2707

Open

Description

@ejsmith

The generated OpenAPI document has two errors that make API calls fail or behave unexpectedly:

  1. The event submit GET endpoints document an identityname query parameter. The server reads identity.name.
  2. The token create endpoints say valid scopes are client, user, admin. The scope is actually named global, and admin is rejected.

Where

What happens

  • GET /api/v2/events/submit?...&identity=jane@example.com&identityname=Jane stores identityname as a custom data property, and the user's name isn't set.
  • Creating a token with "scopes": ["admin"] returns a validation error, "Invalid token scope requested."

Expected

The parameter is documented as identity.name, and the scope descriptions list client, user, global (global admins only), and source-maps:write.

Suggested fix

Rename the parameter key and description in EventEndpoints.cs, fix the three token descriptions, and regenerate openapi.json. Optionally accept identityname as an alias in EventHandler for clients that followed the docs.

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

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