Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with 'required' field for query parameters when header present #931

Open
akifunal opened this issue Dec 11, 2023 · 0 comments
Open

Comments

@akifunal
Copy link

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']

image
image

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant