Issue with 'required' field for query parameters when header present
akifunal opened this issue · 0 comments
akifunal commented
Describe the bug
When I have both header and query parameters, the "required" field for the query parameter does not seem to work. Without header, it's working correctly.
To Reproduce Steps to reproduce the behavior:
'/package': {
get: {
tags: ['Package'],
parameters: [
{
name: 'PackageDetailId',
in: 'query',
required: true,
schema: {
type: 'integer',
format: 'int64',
},
},
{
name: 'X-LANGUAGE',
in: 'header',
required: false,
schema: {
type: 'string',
default: 'en',
},
},
],
},
},
export type PackageInput = OASRequestParams<
NormalizeOAS<typeof swaggerOAS>,
'/package',
'get'
>['query']
Expected behavior
I expect "query" not to be optional as it is defined as required in schema.
Environment:
- OS: MacOS Sonoma 14.1.2
package-name...
: fets@0.6.8- NodeJS: 20.10.0