🐛 Bug Report
When defining a route, it's easier to schema.query be automatically copied into schema.querystring, mainly because request.query is what we use to access the querystring, and simmetry here would be good.
Moreover, we should look into doing some stricter validation of those properties to catch this type of errors.
To Reproduce
app.get('/', {
schema: {
query: { // this should querystring
type: "object",
properties: {
name: {
type: "string",
default: "world"
}
},
required: ["name"]
}
}
}, async (request, reply) => {
return { hello: request.query.name }
})
Expected behavior
schema.query to work as schema.querystring.
Your Environment
- node version: 10
- fastify version: all
- os: Mac, Windows, Linux
🐛 Bug Report
When defining a route, it's easier to
schema.querybe automatically copied intoschema.querystring, mainly becauserequest.queryis what we use to access the querystring, and simmetry here would be good.Moreover, we should look into doing some stricter validation of those properties to catch this type of errors.
To Reproduce
Expected behavior
schema.queryto work asschema.querystring.Your Environment