Skip to content

Commit

Permalink
Fix bug where idRef used isDocumentIdString instead of isDocumentIdSt…
Browse files Browse the repository at this point in the history
…ringRef
  • Loading branch information
kamarmack committed Nov 12, 2024
1 parent c9b9bb3 commit 50f050f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion typescript-api-helpers/yup-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
isWebUrl,
getDocumentIdString,
isDocumentIdString,
isDocumentIdStringRef,
} from 'ergonomic/data-format-helpers/index.js';
import { GeneralizedFieldTypeEnum } from 'ergonomic/typescript-api-helpers/field-schema-helpers.js';

Expand Down Expand Up @@ -212,7 +213,7 @@ export const getApiObjectYupHelpers = <TCollection extends string>(
`${path} is not a uuid: ${value}`,
name: 'is-uuid',
test: (value) =>
isDocumentIdString(
isDocumentIdStringRef(
referenceCollections.map((_object) => ({
id_prefix: idPrefixMap[_object],
})),
Expand Down

0 comments on commit 50f050f

Please sign in to comment.