-
-
Notifications
You must be signed in to change notification settings - Fork 28
Open
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.6.1
Plugin version
6.1.0
Node.js version
24.0.2
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
15.7.1
Description
I have this code that works perfectly fine in 5.2.0
import { type FastifyPluginAsyncTypebox } from '@fastify/type-provider-typebox';
import { Type } from '@sinclair/typebox';
export const ExecutionIdSchema = Type.String({
format: 'uuid',
});
export const executionController: FastifyPluginAsyncTypebox = async (app) => {
app.post(
'/v1/workflows/run',
{
schema: {
body: Type.Object({
executionId: ExecutionIdSchema,
}),
consumes: ['application/json'],
},
},
async (request) => {
const log = request.log.child({ executionId: request.body.executionId });
const executionId = request.body.executionId; // <-- type of the executionId is string
},
);
};When I upgrade to 6.1.0 (and 6.0.0), the executionId is typed as string | undefined
Link to code that reproduces the bug
fastify/fastify#3617 (comment)
Expected Behavior
The type of the executionId is string (it's not marked as Type.Optional)
Mykhailo-Sichkaruk, kinch-tech, vokrik, ivangelus, robcresswell and 3 more
Metadata
Metadata
Assignees
Labels
No labels