Skip to content

Official OpenAPI Documentation for /api/v1 and /api/cli #857

Open

Description

@dev-null-bot

Official OpenAPI Documentation for /api/v1 and /api/cli

When developing third-party tools, it’s helpful to have an OpenAPI definition that reflects the latest commits.

For example, developers can use it to generate API documentation and clients, or check the diffs to understand changes to the API.

Recommended: https://scramble.dedoc.co/

Environment
Browser Chrome 155.0.0.0
Os Linux
Viewport 948x1059
Pixel ratio 1
Language ja
Color scheme dark
Page /@Xx-RYO-xX

Reported by @eggplants via /dev/null.

Activity

  1. added
    enhancement
    on Oct 20, 2026
  2. zangetsu02 commented on Oct 25, 2026

    @zangetsu02
    Contributor

    I'd like to pick this up. I tried generating the spec with Scramble (latest release, v0.13.49), since it builds the document from routes, FormRequests and resources without annotations.

    Most of the output looks good, but it gets the path parameters wrong on 19 routes: every /api/v1/users/{user:username}/... and /api/v1/remotes/@{partner:username}/... route.

    Actual route Generated by Scramble
    POST /users/{user:username}/follow /users/{follower}/follow (uuid)
    POST /users/{user:username}/block /users/{currentUser}/block (uuid)
    GET /users/{user:username}/followers /users/{currentUser}/followers (string|null)
    PUT /remotes/@{partner:username}/read /remotes/@{user}/read (uuid)

    The cause seems to be how Scramble maps route parameters to controller arguments: it matches by type and position, so the injected #[CurrentUser] User argument wins over the real route-bound User. It also ignores the :username binding key and documents the parameter as the model's uuid primary key. Routes without an injected current user ({org}, {message}, {messageImage}) are generated correctly.

    I confirmed it by swapping the argument order in UserFollowController::store: Scramble then produced the correct {user} parameter typed as a username string.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions