Schema errors with Stream resource using Foundry code snippet

I have created a new stream resource, defining the custom schema using some example JSON. Once created I have tried posting the same example JSON from Postman and get a 400 Bad Request with error name “Api:RecordDoesNotMatchStreamSchema”.

I get this same error when using the Python code snippet automatically generated by foundry once the resource is created.

Has anyone else experienced this issue? There is no information to debug in what way the schema does not match what the endpoint expects.

Update: The error was caused by keys in the JSON containing some prohibited characters (:, -, $, @). Frustratingly when creating the stream there is a validation to check against hyphens “-” but not the other characters so you are able to create the stream even though the schema will not work.