You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues to ensure the bug has not already been reported
Fastify version
5.14.1
Plugin version
No response
Node.js version
20.11.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
22.04.4
Description
When stringifying JSON schema that has a single quote character (') in the name of the property and the property is required at the same time, the generated function is syntactically incorrect and the process fails.
Prerequisites
Fastify version
5.14.1
Plugin version
No response
Node.js version
20.11.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
22.04.4
Description
When stringifying JSON schema that has a single quote character (
'
) in the name of the property and the property is required at the same time, the generated function is syntactically incorrect and the process fails.Steps to Reproduce
will fail with
as the code the schema is translated to is as follows:
Expected Behavior
Schema is accepted and stringified. It should be enough to escape the single quote character (
'
) in the generated error message.Expected output of the generated functions would be
The text was updated successfully, but these errors were encountered: