Skip to Content
Contracts

Contracts

Stoney verifies different types of API behavior.


HTTP Contracts

The most common type. Verifies status codes:

says: "GET /api/users returns 200" steps: - http: method: GET path: /api/users headers: Authorization: "Bearer ${STONEY_TOKEN}" expect: status: 200

Contract Tiers

Stateless

No authentication needed:

tier: stateless says: "Login requires credentials" steps: - http: method: POST path: /api/auth/login expect: status: 401

Auth Only

Requires a token:

tier: auth_only says: "List orders succeeds" steps: - http: method: GET path: /api/orders headers: Authorization: "Bearer ${STONEY_TOKEN}" expect: status: 200

Reviewing Suggestions

The Discover page shows Stoney’s suggestions. Each shows:

FieldMeaning
MethodHTTP method
PathNormalized endpoint
StatusObserved response code
Confidence0-100 certainty

Click Activate to enforce, or Dismiss to hide.


Editing Contracts

From the Contracts page:

  • Deactivate: Pause enforcement without deleting
  • Delete: Remove permanently with history
  • Edit: Change description, domain, or linked ticket

Failure Modes

TypeMeaning
Status mismatchExpected 200, got 500
Shape mismatchMissing required field
TimeoutRequest took too long
Last updated on