POST
/
v1
/
fix-string-literals
JavaScript
import Benchify from 'benchify';

const client = new Benchify({
  apiKey: 'My API Key',
});

const response = await client.fixStringLiterals.run({ file: { contents: 'contents', path: 'x' } });

console.log(response.data);
{
  "data": {
    "status": "FIXED",
    "contents": "<string>",
    "message": "<string>",
    "error": "<string>",
    "diagnostics_found": 1,
    "relevant_error": {
      "message": "<string>",
      "category": "typescript",
      "severity": "error",
      "code": 123,
      "file_path": "<string>",
      "location": {
        "line": 123,
        "column": 123,
        "starting_character_position": 123,
        "span": 123
      },
      "context": "<string>"
    }
  },
  "meta": {
    "trace_id": "<string>",
    "external_id": "<string>"
  },
  "error": {
    "code": "<string>",
    "message": "<string>",
    "details": "",
    "suggestions": []
  }
}

Authorizations

Authorization
string
header
required

Benchify API Key. Obtain a key from the Benchify web portal under Settings > Credentials. Provide the key in the Authorization header as Bearer $BENCHIFY_KEY.

Body

application/json

Request model for the /api/fix_string_literals endpoint

Response

200
application/json

Successful Response

Wrapped response model for benchify-api compatibility