Skip to content

Commit

Permalink
chore(readme): add wording for period inclusion of unstable fields (#94)
Browse files Browse the repository at this point in the history
* chore: add wording for period inclusion of unstable fields

* Update README.md

Co-authored-by: tshuli <[email protected]>

---------

Co-authored-by: tshuli <[email protected]>
  • Loading branch information
KenLSM and tshuli authored Nov 17, 2023
1 parent 7ba2a38 commit c07f4a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ of the returned object.
Note that due to end-to-end encryption, FormSG servers are unable to verify the data format.

However, the `decrypt` function exposed by this library [validates](https://github.com/opengovsg/formsg-javascript-sdk/blob/master/src/util/validate.ts) the decrypted content and will **return `null` if the
decrypted content does not fit the schema displayed below.**
decrypted content does not contain all of the fields displayed in the schema below.**

| Key | Type | Description |
| ----------- | -------- | -------------------------------------------------------------------------------------------------------- |
Expand All @@ -146,6 +146,9 @@ decrypted content does not fit the schema displayed below.**
| fieldType | string | The type of field for the question. |
| \_id | string | A unique identifier of the form field. WARNING: Changes when new fields are created/removed in the form. |

**Important Note: **
Additional internal fields may be included in webhooks from time to time, which will then be published as part of our official schema once it is stable for public consumption. If you are applying your own validation, you should account for this e.g. by not rejecting the webhook if there are additional fields included.

The full schema can be viewed in
[`validate.ts`](https://github.com/opengovsg/formsg-javascript-sdk/tree/master/src/util/validate.ts).

Expand Down

0 comments on commit c07f4a0

Please sign in to comment.