Alternative · target: api mock server alternative to prism
Prism Alternative for Shipment tracking API Seed Data
User wants one mock server choice that also handles stateful resource lifecycles.
Direct answer
SchemaSeed reads the Shipment tracking API schema and writes loadable rows; Prism serves example responses over HTTP and emits no relational seed 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 Prism is usually sufficient.
The same Shipment tracking API schema run through Prism yields a JSON document whose scans.shipment_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: 1 Stack Overflow questions, @stoplight/prism-http at 1,449,734 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 — Shipment tracking
Prism 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 Shipment tracking API fixture is one table with no cross-table references, the honest answer is that Prism 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. Prism reads one schema and produces one document; it has no second schema to read, so it cannot know that scans.shipment_id must point at a row in shipments. 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 Shipment tracking API 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 Shipment tracking API the diff is usually small: 2 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 Prism. 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.
| Criterion | SchemaSeed | Prism | What decided it |
|---|---|---|---|
| Reads a multi-file OpenAPI document | yes | yes | both resolve local $ref chains |
| Honours NOT NULL | yes | partial | both read the required array |
| Honours enum, range and length declarations | yes | partial | the fixture declares shipments.status with status IN ('label_created','in_transit','delivered'); 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 members | yes | yes | the enum array is copied verbatim |
| Produces SQL, not just JSON | yes | no | output format is the difference |
| Resolves foreign keys across schemas | yes | no | the fixture has scans.shipment_id pointing at shipments, and the second tool never reads that table |
| Emits deliberately invalid instances | yes | no | negative cases are a separate output |
| Same seed produces the same bytes | yes | no | both are seedable |
| Failure class | Column | SQLSTATE | Error name | Engine message (verbatim) |
|---|---|---|---|---|
| Missing required field | shipments.tracking | 23502 | not_null_violation | NOT NULL constraint failed: shipments.tracking |
| Out-of-contract value | shipments.status | 23514 | check_violation | CHECK constraint failed: shipments_status_check |
| Dangling foreign key | scans.shipment_id | 23503 | foreign_key_violation | FOREIGN KEY constraint failed |
| Check | Result on this fixture | Consequence |
|---|---|---|
| More than one table references another | yes — scans → shipments | the generator must resolve cross-table references |
| Output has to be SQL, not JSON | yes — the target is PostgreSQL | a document generator produces the wrong artefact |
| Tests must assert the API rejects bad input | yes — a negative case for every declaration in the schema | negative instances have to be generated separately |
| Same seed must reproduce the same bytes | yes — seed 42 is fixed | fixtures can be committed and diffed |
npx --yes @wenlu8848/schemaseed generate --input ./alt_logistics.openapi.yaml --out ./seed --formats sql --count 10 --seed 42
Download alt_logistics.openapi.yaml
-- Generated by schemaseed.
-- seed: 42
-- rows per table: 10
-- Foreign key values are taken from the rows of the referenced table.
BEGIN;
CREATE TABLE IF NOT EXISTS "shipments" (
"id" UUID,
"tracking" TEXT NOT NULL,
"carrier" TEXT NOT NULL,
"status" TEXT NOT NULL,
"created_at" TIMESTAMPTZ NOT NULL,
CONSTRAINT "shipments_pkey" PRIMARY KEY ("id"),
CONSTRAINT "shipments_status_check" CHECK ("status" IN ('label_created', 'in_transit', 'delivered'))
);
CREATE TABLE IF NOT EXISTS "scans" (
"id" UUID,
"shipment_id" UUID NOT NULL,
"scanned_at" TIMESTAMPTZ NOT NULL,
"code" TEXT NOT NULL,
CONSTRAINT "scans_pkey" PRIMARY KEY ("id")
);
DO $schema_seed$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_constraint WHERE conname = 'scans_shipment_id_fkey') THEN
ALTER TABLE "scans" ADD CONSTRAINT "scans_shipment_id_fkey" FOREIGN KEY ("shipment_id") REFERENCES "shipments" ("id");
END IF;
END
$schema_seed$;
INSERT INTO "shipments" ("id", "tracking", "carrier", "status", "created_at")
VALUES ('9db1f3f7-7a5b-4e2d-9d32-3aa1d4cdf29f', 'juniper-tundra-136', 'kai.okafor@example.net', 'in_transit', '2023-11-05T13:26:37.000Z')
ON CONFLICT DO NOTHING;
INSERT INTO "shipments" ("id", "tracking", "carrier", "status", "created_at")
VALUES ('93ef7252-a043-4a22-98b9-3f2ffe2ad0a1', 'Osaka, Oak Drive 167', 'lumen indigo', 'label_created', '2026-01-26T04:05:56.000Z')
ON CONFLICT DO NOTHING;
INSERT INTO "shipments" ("id", "tracking", "carrier", "status", "created_at")
VALUES ('f43df7ac-05f6-45b9-8450-8b5cd72f9ecc', 'river alpha', 'nimbus willow', 'delivered', '2024-10-09T08:20:12.000Z')
ON CONFLICT DO NOTHING;
INSERT INTO "shipments" ("id", "tracking", "carrier", "status", "created_at")
VALUES ('b98ae8d4-e1bf-40f9-b174-3a2fbfa06647', 'tundra-indigo-97', 'nimbus onyx', 'in_transit', '2020-07-28T17:51:39.000Z')
ON CONFLICT DO NOTHING;
INSERT INTO "shipments" ("id", "tracking", "carrier", "status", "created_at")
VALUES ('72b2ec2a-021a-4ceb-9f73-a1aeeb70afb7', 'harbor-juniper-86', 'umbra ember', 'label_created', '2026-08-02T19:41:35.000Z')
ON CONFLICT DO NOTHING;
INSERT INTO "shipments" ("id", "tracking", "carrier", "status", "created_at")
VALUES ('5ca7b736-0d13-49ac-8160-dfd96654f9e5', 'Berlin, Oak Drive 22', 'vertex juniper', 'delivered', '2020-09-22T08:41:04.000Z')
ON CONFLICT DO NOTHING;
INSERT INTO "shipments" ("id", "tracking", "carrier", "status", "created_at")
VALUES ('bf6a5232-40f6-4034-b7ac-da995913a381', 'tundra delta', 'nimbus quartz', 'label_created', '2020-08-23T15:48:14.000Z')
ON CONFLICT DO NOTHING;
INSERT INTO "shipments" ("id", "tracking", "carrier", "status", "created_at")
VALUES ('2d7376b5-b741-40a5-8bab-cb09220ba2c1', 'quartz umbra', 'willow-river-233', 'delivered', '2020-11-03T04:19:50.000Z')
ON CONFLICT DO NOTHING;
INSERT INTO "shipments" ("id", "tracking", "carrier", "status", "created_at")
VALUES ('2deb85a0-5233-4d45-808f-c757382a25c1', 'ember tundra', 'harbor bravo', 'label_created', '2026-12-12T13:47:08.000Z')
ON CONFLICT DO NOTHING;
INSERT INTO "shipments" ("id", "tracking", "carrier", "status", "created_at")
VALUES ('01f2cb56-c794-4d19-a999-5fdd3a22a060', 'indigo grove', 'nia.kaur@mail.example', 'delivered', '2021-08-27T16:31:21.000Z')
ON CONFLICT DO NOTHING;
INSERT INTO "scans" ("id", "shipment_id", "scanned_at", "code")
VALUES ('56b83475-fca8-49cb-93fb-3bad4f7c5abc', 'b98ae8d4-e1bf-40f9-b174-3a2fbfa06647', '2024-08-06T20:39:56.000Z', 'Bogota, Harbor Road 70')
ON CONFLICT DO NOTHING;
INSERT INTO "scans" ("id", "shipment_id", "scanned_at", "code")
VALUES ('e2b90662-5ceb-42a5-9064-dc48817813d9', '01f2cb56-c794-4d19-a999-5fdd3a22a060', '2023-10-09T02:53:57.000Z', 'gus.costa@example.net')
ON CONFLICT DO NOTHING;
INSERT INTO "scans" ("id", "shipment_id", "scanned_at", "code")
VALUES ('70a3fec2-034a-48f0-8e42-92b417418336', '5ca7b736-0d13-49ac-8160-dfd96654f9e5', '2025-02-18T18:42:41.000Z', 'Bao Jansen')
ON CONFLICT DO NOTHING;
INSERT INTO "scans" ("id", "shipment_id", "scanned_at", "code")
VALUES ('ce77ca98-5006-4c54-900f-131c1f53379e', 'f43df7ac-05f6-45b9-8450-8b5cd72f9ecc', '2020-07-18T13:44:05.000Z', 'fable-ember-459')
ON CONFLICT DO NOTHING;
INSERT INTO "scans" ("id", "shipment_id", "scanned_at", "code")
VALUES ('fdb64a55-0838-455f-8aa4-aba1a42e7f1f', 'f43df7ac-05f6-45b9-8450-8b5cd72f9ecc', '2024-11-17T11:29:34.000Z', 'tara.duarte@example.net')
ON CONFLICT DO NOTHING;
INSERT INTO "scans" ("id", "shipment_id", "scanned_at", "code")
VALUES ('8aebdce1-2ada-4c4c-afdb-ef55a13b288f', '72b2ec2a-021a-4ceb-9f73-a1aeeb70afb7', '2022-09-01T17:13:51.000Z', 'ember river')
ON CONFLICT DO NOTHING;
INSERT INTO "scans" ("id", "shipment_id", "scanned_at", "code")
VALUES ('be94b15c-5e2e-4d42-b481-177bf0eebd41', '01f2cb56-c794-4d19-a999-5fdd3a22a060', '2020-03-19T03:00:41.000Z', 'delta grove')
ON CONFLICT DO NOTHING;
INSERT INTO "scans" ("id", "shipment_id", "scanned_at", "code")
VALUES ('47792d68-18d8-41a7-aeac-65bb688e72fb', 'bf6a5232-40f6-4034-b7ac-da995913a381', '2020-01-06T15:49:46.000Z', 'nia.novak@example.org')
ON CONFLICT DO NOTHING;
INSERT INTO "scans" ("id", "shipment_id", "scanned_at", "code")
VALUES ('3ca239a3-aebd-441e-ad2f-a391b7788968', 'bf6a5232-40f6-4034-b7ac-da995913a381', '2026-04-08T22:36:20.000Z', 'river umbra')
ON CONFLICT DO NOTHING;
INSERT INTO "scans" ("id", "shipment_id", "scanned_at", "code")
VALUES ('bda2e53d-6111-4d05-a207-8ffdd381ef2b', 'bf6a5232-40f6-4034-b7ac-da995913a381', '2023-02-22T17:09:19.000Z', 'sami.kaur@test.dev')
ON CONFLICT DO NOTHING;
COMMIT;
Frequently asked questions
- Is Prism still worth using?
- For one flat schema, yes. The gap opens on Shipment tracking API: Prism produces values for a single schema, while this fixture has 2 related tables that have to load together.
- Can I keep the fixtures I already wrote?
- Yes. Regenerate against the same Shipment tracking API schema and diff. On this fixture only the constrained columns move, and the negative cases are additive.
- Does SchemaSeed replace Prism entirely?
- No. It is a different artefact: Prism produces values for one schema, SchemaSeed produces a PostgreSQL seed script plus invalid instances for 2 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