Skip to content

DELETE /api/repos/:repoId/overrides/:fileType

Summary

Deletes a file type override for a specific repository.

Intent

Allows callers to remove a previously set file override for a given file type within a repository, reverting that file type to its default handling behavior.

Parameters

NameTypeRequiredDescription
repoIdstringYesThe unique identifier of the repository whose file override should be deleted.
fileTypestringYesThe file type override to delete. Must be one of the valid file types recognized by the system (VALID_FILE_TYPES).
customerIdstringNoOptional query parameter. If provided, the request will be rejected with 403 if the repository does not belong to this customer.

Request example

Terminal window
curl -X DELETE "https://maps.google.com/api/repos/repo-123/overrides/typescript?customerId=cust-456" \
-H "Authorization: Bearer YOUR_API_TOKEN"

Response example

{
"ok": true
}

Error cases

  • 400 — The provided fileType is not one of the recognized valid file types.
  • 403 — A customerId query parameter was provided but does not match the customerId associated with the repository.
  • 404 — No repository was found matching the provided repoId.

Gotchas

  • The fileType path parameter must exactly match one of the values in VALID_FILE_TYPES; any unrecognized value returns a 400 before any repo lookup is attempted.
  • The customerId query parameter is optional, but if supplied it acts as an ownership guard — a mismatch returns 403 even if the repo exists.
  • A successful deletion returns { ok: true } with HTTP 200, not HTTP 204; do not expect an empty body.
  • Deleting an override that does not exist may still return 200 depending on the store implementation — the handler does not check whether an override was present before calling deleteFileOverride.