Skip to content

OpenAPI documentation mismatches with actual auth API behavior #211

@ikoral

Description

@ikoral

Summary
Several auth API endpoints have OpenAPI annotations (#[utoipa::path]) that don't match the actual handler behavior. I discovered these while building a SvelteKit frontend against TrailBase v0.23.9.

  1. POST /api/auth/v1/reset_password/update/:password_reset_code
    Docs say: password_reset_code is a URL path parameter, response is 200.
    Actual behavior: The handler reads password_reset_code from the request body only (via Either), not from the URL path. The path parameter is ignored. Sending POST /api/auth/v1/reset_password/update/{code} returns 404. The working endpoint is POST /api/auth/v1/reset_password/update with the code in the JSON body. On success, it returns 303 (redirect), not 200.
    Source reference: — the annotation says path = "/reset_password/update/:password_reset_code" but reset_password_update_handler extracts from Either.
  2. POST /api/auth/v1/register
    Docs say: Response is 200.
    Actual behavior: Returns 303 redirect on successful registration.
  3. GET /api/auth/v1/verify_email/confirm/:email_verification_code
    Docs say: Response is 200.
    Actual behavior: Returns 302 or 303 redirect on successful verification.
  4. POST /api/auth/v1/reset_password/request
    Docs say: Response is 200.
    Actual behavior: Returns a redirect on success (not 200).

Environment
TrailBase v0.23.9 (Docker: trailbase/trailbase:0.23.9)
trailbase JS client v0.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions