Does uniqueItems Prevent Two Records from Using the Same Business ID?
An import array passes a uniqueness check even though two records use the same project ID. The records have different descriptions, so the complete objects are different.
Decide whether the contract requires unique items, unique business identifiers or both. Those are separate checks.
Define what must be unique
JSON Schema's array reference describes uniqueItems as requiring unique array items.
For an array of objects, that is not a declaration that one particular property is a unique business key. Review the complete item comparison separately from the application's identity rule.
Name the key and its scope. A project code might be unique within an organization rather than across every imported record in the system.
Test a concrete pair
Illustrative example: the same ID twice
A fictional import contains one object with ID Cedar and description First, and another with ID Cedar and description Revised.
The objects differ, but their IDs are the same. A whole-item uniqueness rule alone does not express the intended one-record-per-ID contract.
Add a separate business-key check and decide how the import should report the conflict.
Contrast an exact duplicate
Include two fully identical objects in another fixture. A uniqueItems rule can detect that kind of duplication.
Keep both fixtures. Passing the exact-duplicate test does not demonstrate that repeated IDs with differing content will be caught.
Specify normalization before comparison
Decide whether case, surrounding whitespace or another representation difference changes the identity. Apply only the normalization the business contract permits.
Read writing a field-mapping contract to record the key's source, destination and comparison rules.
Do not merge records solely because their names look similar. Identity should come from an agreed rule and appropriate evidence.
Choose the import outcome deliberately
Possible policies include rejecting the affected batch, isolating conflicting records for review or applying a documented update operation. Each has different consequences.
Do not silently keep the first or last object unless that behavior is an explicit requirement. Input order should not accidentally decide which business facts survive.
Preserve both conflicting inputs in an appropriate diagnostic record, with private data minimized.
Verify the complete boundary
Test unique IDs, exact duplicates, repeated IDs with different content and identifiers that differ only under the chosen normalization rule.
Also consider existing destination records. Uniqueness within one request does not establish uniqueness against records already stored or arriving concurrently.
The final evidence should show which layer enforces each requirement. A schema can validate item structure while the application and storage layer enforce the business identity contract. Naming those responsibilities prevents a single uniqueness flag from carrying a promise it does not express.
Editorial note
Prepared with AI assistance. Primary sources and the FutureOS article inventory were checked on October 26, 2026. Examples are illustrative, not customer results. FutureOS is described as being in prelaunch in its current introduction. This guide does not claim an available product feature, integration or service, and no independent expert review is claimed.




Comments