Closed cjhensen closed 1 year ago
Hey @cjhensen sorry for the long wait, I was out and couldn't get to this until today.
So the validations actually are the difference between development
and production
mode. If you make a build for production
(build --mode prod
) it will remove them
The problem is on our end, the schema id shouldn't have spaces: "$id": "Thing viewed"
so either our servers or Typewriter need to sanitize those (pushing a fix for Typewriter for now, until we get that fixed on the server). Sorry for the inconvenience!
@oscb thanks for the answer, I'm not seeing that as the issue on my end. I'm running into the exact same issue as @cjhensen but my analytics file wasn't generated with spaces. Any other thoughts?
Thanks for taking the time to contribute to Typewriter!
Hey @oscb! Thanks for fixing the usage of
validateAgainstSchema
(this issue)!Running on localhost with my analytics library generated in "development" mode, I see errors being thrown on schema validation:
Looking at the schema defined in each tracking function, such as:
It's unclear what the
data.$id
is referring to in the error. Is it the"$id": "Thing viewed"
? Furthermore, my event properties in the code match those define in the tracking plan, so not sure how to resolve this issue.Given the errors, I wanted to disable runtime validation, so I set
runtime-typecheck
tofalse
intypewriter.yml
, however thevalidateAgainstSchema
function is still called for each tracking function after re-generating the client.