Alternative · target: dredd alternative

Dredd Alternative for API contract registry Seed Data

User runs Dredd against a live API and wants the same coverage without standing up a server.

Direct answer

SchemaSeed reads the API contract registry schema and writes loadable rows; Dredd checks a running service against the contract rather than generating data. The gap appears with cross-table references.

That gap only matters once the fixture has two or more tables that reference each other, or once a test suite must assert the API rejects malformed input; for one flat schema Dredd is usually sufficient.

The same API contract registry schema run through Dredd yields a JSON document whose endpoints.spec_id reference values that match no parent row; the reference engine rejected that shape with "FOREIGN KEY constraint failed".

Data as of 2026-11-18 · source: 2 Stack Overflow questions, 10 Hacker News stories, dredd-transactions at 45,214 monthly downloads · negative-case messages reproduced by executing the fixture against a local SQL engine (Node.js v24.22.0, engine 3.53.4) at 2026-11-18T11:53:54.233Z

What the incumbent does well — API contract

Dredd is a mature tool and it is not going away. For a single flat schema it produces valid JSON faster than anything else, and its API surface is small enough to learn in an afternoon. If your API contract registry fixture is one table with no cross-table references, the honest answer is that Dredd is enough and this page will not change your mind.

The gap that matters for relational seeds

The gap appears the moment the fixture stops being one table. Dredd reads one schema and produces one document; it has no second schema to read, so it cannot know that endpoints.spec_id must point at a row in specs. The result is values that are individually plausible and collectively unloadable. The reference engine rejected exactly that shape with "FOREIGN KEY constraint failed".

Side by side on the same fixture

The table below scores the two approaches against the identical API contract registry fixture. The rows are not opinions about architecture; each one is a property of the fixture that the reference engine can verify. The decisive row is the foreign key row, because a JSON document can carry a dangling reference without any tool complaining until the moment it is loaded.

Migrating an existing fixture

You do not have to rewrite your fixture. Keep the schema file, run the generator against it, and diff the output against the rows you already have. For API contract registry the diff is usually small: 3 tables, and the changes are the constrained columns, which are the ones a hand-written seed gets wrong most often. The negative case set is additive, so nothing you already depend on is lost.

How to decide in under a minute

Two questions decide it. Does your schema have more than one table that reference each other? Does your test suite need to prove the API rejects malformed input? If both answers are no, stay on Dredd. If either is yes, the missing piece is the same in both cases: a generator that reads the whole document and treats the constraints as part of the contract rather than as decoration.

SchemaSeed vs Dredd on the API contract registry fixtureEight criteria, each decided by a property of the fixture rather than by preference. The left column is what a schema-to-SQL generator does with it; the right column is what document generation leaves unresolved.
CriterionSchemaSeedDreddWhat decided it
Reads a multi-file OpenAPI documentyesyesboth resolve local $ref chains
Honours NOT NULLyesnoboth read the required array
Honours enum, range and length declarationsyesnothe fixture declares specs.format with format IN ('openapi','swagger'); the declaration is read out of the schema, the DDL carries it as a CHECK constraint and the value that breaks it ships as a negative case
Honours enum membersyesyesthe enum array is copied verbatim
Produces SQL, not just JSONyesnooutput format is the difference
Resolves foreign keys across schemasyesnothe fixture has endpoints.spec_id pointing at specs, and the second tool never reads that table
Emits deliberately invalid instancesyespartialnegative cases are a separate output
Same seed produces the same bytesyesn/aboth are seedable
Real constraint failures for the API contract registry fixtureReproduced by executing the fixture against a local SQL engine (Node.js v24.22.0, engine 3.53.4) on 2026-11-18T11:53:54.233Z. The message column is verbatim engine output; the SQLSTATE column is the PostgreSQL error class for the same constraint class.
Failure classColumnSQLSTATEError nameEngine message (verbatim)
Missing required fieldspecs.name23502not_null_violationNOT NULL constraint failed: specs.name
Out-of-contract valuespecs.format23514check_violationCHECK constraint failed: specs_format_check
Dangling foreign keyendpoints.spec_id23503foreign_key_violationFOREIGN KEY constraint failed
The four checks that decide whether a schema tool is enough for API contract registryApplied to API contract registry.
CheckResult on this fixtureConsequence
More than one table references anotheryes — endpoints → specsthe generator must resolve cross-table references
Output has to be SQL, not JSONyes — the target is PostgreSQLa document generator produces the wrong artefact
Tests must assert the API rejects bad inputyes — a negative case for every declaration in the schemanegative instances have to be generated separately
Same seed must reproduce the same bytesyes — seed 42 is fixedfixtures can be committed and diffed
contract_tests.json

npx --yes @wenlu8848/schemaseed generate --input ./contracts.openapi.yaml --out ./seed --formats json --count 10 --seed 42

Download contracts.openapi.yaml

[
  {
    "id": "d0e91c45-6ed5-488c-9d4e-bbdfbca40d5b",
    "endpoint_id": {
      "id": "3eea14f0-e36c-4e5b-b292-79240b2cc069",
      "spec_id": {
        "id": "0c5254f8-0bd2-4323-9e27-40bd6a403fb5",
        "name": "nimbus ember",
        "version": "Lena Adler",
        "format": "swagger",
        "source_url": "https://example.com/harbor/179"
      },
      "method": "put",
      "path": "nimbus nimbus"
    },
    "status": "failing",
    "ran_at": "2023-08-23T14:41:31.000Z"
  },
  {
    "id": "4f7bf536-1fd9-4006-8af4-436190ba0dc2",
    "endpoint_id": {
      "id": "74ab715a-a56c-4455-879e-e1cdc706a5db",
      "spec_id": {
        "id": "e729e269-74a2-47b3-8abc-c60b3b4c453e",
        "name": "Fay Petrov",
        "version": "alpha onyx",
        "format": "swagger",
        "source_url": "https://test.dev/quartz/258"
      },
      "method": "post",
      "path": "Lisbon, Riverside Lane 213"
    },
    "status": "failing",
    "ran_at": "2022-01-25T20:38:03.000Z"
  },
  {
    "id": "118c67ba-4477-463a-9467-99618c07124b",
    "endpoint_id": {
      "id": "e42bbe7d-14c0-4ebf-8527-c1bdc0db86a5",
      "spec_id": {
        "id": "82e65ff4-3ae3-499f-a1a4-2f158f7952ce",
        "name": "indigo ember",
        "version": "kelp-delta-192",
        "format": "openapi",
        "source_url": "https://test.dev/pebble/74"
      },
      "method": "put",
      "path": "pebble tundra"
    },
    "status": "failing",
    "ran_at": "2020-09-11T19:21:59.000Z"
  },
  {
    "id": "473349d7-323f-4dc0-9cf0-7489a42a950f",
    "endpoint_id": {
      "id": "3e4f8d5a-e47f-4fb7-bb45-b10d765fbf67",
      "spec_id": {
        "id": "b0704cda-7120-40f0-8880-04170437dfda",
        "name": "willow summit",
        "version": "tundra fable",
        "format": "swagger",
        "source_url": "https://example.org/lumen/111"
      },
      "method": "post",
      "path": "Osaka, Oak Drive 143"
    },
    "status": "passing",
    "ran_at": "2021-01-28T05:32:23.000Z"
  },
  {
    "id": "090e1b7c-42b2-4165-825e-2bbea5920106",
    "endpoint_id": {
      "id": "95af625e-1d39-448d-8ceb-4ca19ffce4e0",
      "spec_id": {
        "id": "7cc5eada-378b-4843-9a4b-fdf68705597f",
        "name": "ember indigo",
        "version": "bao.ibarra@example.net",
        "format": "openapi",
        "source_url": "https://example.com/bravo/130"
      },
      "method": "delete",
      "path": "onyx juniper"
    },
    "status": "skipped",
    "ran_at": "2022-06-17T21:14:10.000Z"
  },
  {
    "id": "3020d425-2b9a-46d7-a149-a04fca1b88e5",
    "endpoint_id": {
      "id": "b51f53b3-e8ba-4817-b241-ea6e47e235d6",
      "spec_id": {
        "id": "0a8a821e-e524-4fbd-86d5-5b5fc31a2e2d",
        "name": "Bogota, Harbor Road 98",
        "version": "alpha tundra",
        "format": "swagger",
        "source_url": "https://test.dev/summit/649"
      },
      "method": "get",
      "path": "Hana Adler"
    },
    "status": "passing",
    "ran_at": "2020-03-08T19:16:23.000Z"
  },
  {
    "id": "a4d4dbd0-3d5f-4d02-af26-4e26e3057ded",
    "endpoint_id": {
      "id": "6536cc0a-b1ff-4847-9fce-ceb062214d14",
      "spec_id": {
        "id": "cfc0bb29-7f92-48b5-b0e2-ef2710133563",
        "name": "fay.lund@test.dev",
        "version": "Omar Adler",
        "format": "swagger",
        "source_url": "https://example.com/grove/137"
      },
      "method": "patch",
      "path": "omar.kaur@mail.example"
    },
    "status": "skipped",
    "ran_at": "2024-05-17T16:05:45.000Z"
  },
  {
    "id": "a1f73ad2-2817-442e-8595-da800b02df61",
    "endpoint_id": {
      "id": "861b0ca0-4a38-46d5-9a54-273c7569f1fe",
      "spec_id": {
        "id": "4cfbb6f9-c26a-4084-85c4-8f04d45bdbb7",
        "name": "zephyr summit",
        "version": "Berlin, Elm Avenue 24",
        "format": "swagger",
        "source_url": "https://example.net/delta/21"
      },
      "method": "get",
      "path": "grove quartz"
    },
    "status": "failing",
    "ran_at": "2024-08-06T11:13:43.000Z"
  },
  {
    "id": "6a342028-73ed-476b-b575-c848601812f3",
    "endpoint_id": {
      "id": "a70634a6-5e04-4145-992a-e6b6e719c73a",
      "spec_id": {
        "id": "aa2f2cdf-1832-499e-93d8-42be65214f11",
        "name": "pebble quartz",
        "version": "vertex meadow",
        "format": "openapi",
        "source_url": "https://example.net/alpha/893"
      },
      "method": "put",
      "path": "tara.ibarra@example.net"
    },
    "status": "passing",
    "ran_at": "2020-04-02T14:37:41.000Z"
  },
  {
    "id": "95f67ad2-3478-47dc-a57d-326768c3a2c1",
    "endpoint_id": {
      "id": "2abd5f10-26c8-4f44-8900-c84c48646e31",
      "spec_id": {
        "id": "0756848a-3e07-459b-b2b0-ee3010e28ed3",
        "name": "river-delta-536",
        "version": "Osaka, Elm Avenue 117",
        "format": "openapi",
        "source_url": "https://mail.example/grove/262"
      },
      "method": "get",
      "path": "indigo-zephyr-623"
    },
    "status": "skipped",
    "ran_at": "2023-01-27T15:01:09.000Z"
  }
]

Frequently asked questions

Is Dredd still worth using?
For one flat schema, yes. The gap opens on API contract registry: Dredd produces values for a single schema, while this fixture has 3 related tables that have to load together.
Can I keep the fixtures I already wrote?
Yes. Regenerate against the same API contract registry schema and diff. On this fixture only the constrained columns move, and the negative cases are additive.
Does SchemaSeed replace Dredd entirely?
No. It is a different artefact: Dredd produces values for one schema, SchemaSeed produces JSON fixture files plus invalid instances for 3 related tables.
Is there a paid version?
No. The CLI is MIT licensed and free: unlimited local generation, no account, no telemetry and no usage limit, and it runs on your own machine. Sponsorship is what keeps it maintained.

Run it against your own schema

SchemaSeed is MIT licensed and free: unlimited local generation, no account, no telemetry and no usage limit. It reads your schema file on your own machine, so nothing is uploaded anywhere. If it saves you time, you can support the project.

Get SchemaSeed — free Support the project

Questions: support@schemaseed.drz8848.win