{
  "openapi": "3.0.3",
  "info": {
    "title": "Playground API — Auth",
    "version": "1.0.0",
    "description": "Zero-config per-identity sandboxed mock REST API with relational filtering, dynamic sorting, and network simulation."
  },
  "servers": [
    {
      "url": "http://playground-api-xi.vercel.app",
      "description": "Default Server"
    }
  ],
  "paths": {
    "/auth/login": {
      "post": {
        "summary": "Authenticate user with username/email & password to receive signed JWT access and refresh tokens.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Operation",
            "content": {
              "application/json": {
                "example": {}
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "username": "Bret",
                "password": "password123"
              }
            }
          }
        }
      }
    },
    "/auth/register": {
      "post": {
        "summary": "Register a new session user and immediately receive signed JWT tokens.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Operation",
            "content": {
              "application/json": {
                "example": {}
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "name": "Alice Smith",
                "username": "alice",
                "email": "alice@example.com",
                "password": "password123"
              }
            }
          }
        }
      }
    },
    "/auth/refresh": {
      "post": {
        "summary": "Exchange a valid refresh token for a fresh 15-minute JWT access token.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Operation",
            "content": {
              "application/json": {
                "example": {}
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6..."
              }
            }
          }
        }
      }
    },
    "/auth/me": {
      "get": {
        "summary": "Retrieve current authenticated user profile using Authorization: Bearer <access_token>.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Operation",
            "content": {
              "application/json": {
                "example": {}
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update current authenticated user profile in the session sandbox using Authorization: Bearer <access_token>.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Operation",
            "content": {
              "application/json": {
                "example": {}
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "name": "Bret - Updated Profile",
                "email": "bret.new@example.com"
              }
            }
          }
        }
      }
    }
  }
}