We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The point of a schema is to impose strict rules around how data should be structured.
It's not clear from the code sample:
https://github.com/searchdiscovery/client-jnj-ga4-dl-spec/blob/c89eb6b620313668e77041fae439c8a7a32e34a7/schemas/item.md?plain=1#L7-L36
As a result, at least one property ("price") has been implemented as a string and not a number. This was missed in QA and UAT.
1. express as a TypeScript interface
interface
interface EventMessage { item_id: string; price: number; affiliation?: string; }
2. express as JSON schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "affiliation": { "type": "string" }, "item_id": { "type": "string" }, "price": { "type": "number", "pattern": "/\d+\.\d{2,}" }, "required": [ "item_id" ] }
The nice thing about JSON Schema is that those rules can be ingested by automated testing software and used in assertions.
adding comments to the code sample is not sufficient!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Issue
The point of a schema is to impose strict rules around how data should be structured.
It's not clear from the code sample:
https://github.com/searchdiscovery/client-jnj-ga4-dl-spec/blob/c89eb6b620313668e77041fae439c8a7a32e34a7/schemas/item.md?plain=1#L7-L36
As a result, at least one property ("price") has been implemented as a string and not a number. This was missed in QA and UAT.
Suggestions
1. express as a TypeScript
interface
2. express as JSON schema
The nice thing about JSON Schema is that those rules can be ingested by automated testing software and used in assertions.
adding comments to the code sample is not sufficient!
The text was updated successfully, but these errors were encountered: