feat DF-468: include form definition version in payload#198
feat DF-468: include form definition version in payload#198whitewaterdesign merged 7 commits intomainfrom
Conversation
414833c to
d14af6e
Compare
| createdAt: new Date('2024-02-01T00:00:00.000Z') | ||
| } | ||
| ] | ||
| } as unknown as FormMetadata |
There was a problem hiding this comment.
not too important, but stub builders are safer than setting as unknown as, then you can pass in only the properties that are important for the test.
| isPreview: formStatus.isPreview, | ||
| notificationEmail: formMetadata?.notificationEmail ?? '' | ||
| notificationEmail: formMetadata?.notificationEmail ?? '', | ||
| ...(versionMetadata && { versionMetadata }) |
There was a problem hiding this comment.
can this be pulled out above the const meta, as would be a bit cleaner than an inline destructure.
| timestamp: now.toISOString(), | ||
| definition: model.def, | ||
| referenceNumber: context.referenceNumber | ||
| } |
There was a problem hiding this comment.
are we not passing version meta in the v2?
There was a problem hiding this comment.
It's not a requirement in this case. I think it wouldn't hurt to add it in, but would prefer a separate PR.
docs/FORM_DEFINITION_FORMATS.md
Outdated
| "versionMetadata": { | ||
| "version": 19, | ||
| "createdAt": "2025-09-08T09:28:15.576Z" | ||
| }, |
There was a problem hiding this comment.
is this documentation obsolete now?
There was a problem hiding this comment.
No, this is correct.
There was a problem hiding this comment.
Better to remove it.
whitewaterdesign
left a comment
There was a problem hiding this comment.
Looks good, couple of minor comments, think when those are updated happy to approve.
7772d2b to
1595722
Compare
|



Proposed change
Jira ticket:
Type of change
Checklist
README.mdanddocs/*(where appropriate, e.g. new features).npm run test).npm run lint).npm run format).