-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
good first issueGood for newcomersGood for newcomersplugin suggestionIdeas for new pluginsIdeas for new plugins
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the feature has not already been requested
🚀 Feature Proposal
Introduce startup validation in Fastify to check consistency between route parameters in path strings and schema definitions.
Motivation
Ensuring route parameter consistency to prevent runtime errors
Example
// Inconsistent route params and schema could lead to unnoticed issues until runtime
fastify.get('/item/:itemId', {
schema: {
params: {
type: 'object',
properties: {
id: { type: 'string' } // Potential issue: 'itemId' in route vs 'id' in schema
}
}
},
handler: (request, reply) => { /* ... */ }
});A pre-runtime check could catch these mismatches early, enhancing developer experience and application stability.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomersplugin suggestionIdeas for new pluginsIdeas for new plugins