[
  {
    "name": "missing_client_key",
    "method": "GET",
    "path": "/schema",
    "status": 401,
    "error_code": "invalid_client_key"
  },
  {
    "name": "invalid_client_key",
    "method": "GET",
    "path": "/schema",
    "headers": {
      "apikey": "bad-key"
    },
    "status": 401,
    "error_code": "invalid_client_key"
  },
  {
    "name": "client_key_header",
    "method": "GET",
    "path": "/schema",
    "headers": {
      "apikey": "good-key"
    },
    "status": 200
  },
  {
    "name": "legacy_x_api_key_header",
    "method": "GET",
    "path": "/schema",
    "headers": {
      "X-API-Key": "good-key"
    },
    "status": 200
  },
  {
    "name": "bearer_client_key_header",
    "method": "GET",
    "path": "/schema",
    "headers": {
      "Authorization": "Bearer good-key"
    },
    "status": 401,
    "error_code": "bearer_requires_client_key"
  },
  {
    "name": "bearer_only_user_jwt",
    "method": "GET",
    "path": "/schema",
    "headers": {
      "Authorization": "Bearer user-jwt"
    },
    "status": 401,
    "error_code": "bearer_requires_client_key"
  },
  {
    "name": "unpublished_schema",
    "method": "GET",
    "path": "/schema/private_notes",
    "headers": {
      "apikey": "good-key"
    },
    "status": 403,
    "error_code": "table_not_published"
  },
  {
    "name": "unknown_table",
    "method": "GET",
    "path": "/table/missing",
    "headers": {
      "apikey": "good-key"
    },
    "status": 404,
    "error_code": "table_not_found"
  },
  {
    "name": "unsupported_sql_route",
    "method": "POST",
    "path": "/sql",
    "headers": {
      "apikey": "good-key",
      "Content-Type": "application/json"
    },
    "body": {
      "sql": "select * from tasks where token = 'do-not-echo'"
    },
    "status": 501,
    "error_code": "unsupported_operation"
  },
  {
    "name": "unsupported_schema_mutation",
    "method": "POST",
    "path": "/schema",
    "headers": {
      "apikey": "good-key",
      "Content-Type": "application/json"
    },
    "body": {
      "table": "created_by_public_client"
    },
    "status": 501,
    "error_code": "unsupported_operation"
  }
]
