Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Fastify version
5.x.x
Plugin version
No response
Node.js version
22.9.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
22.04
Description
I have an endpoint in my Fastify API where in the body I request a field with the type "string" and format "time", in Fastify v4.x.x I passed the format "HH:MM:SS" and it is accepted but after upgrading to v5 running the same test and without modifying anything else I got the error:
{ statusCode: 400, error: 'Bad Request', message: 'body/check_in_time must match format "time"' }
I already checked and when I have the ajv dependency in the last version in Fastify v4 works but in Fastify v5, it doesn't, so it's no problem of ajv.
I have created a simple repository with the example, you just need to change the fastify version and make a request like in the test.http file.
Link to code that reproduces the bug
https://github.com/AlexisMunozC/fastify_error
Expected Behavior
I would expect the format "time" has not changed, or at least describe it to know which is the new format expected.