-
Notifications
You must be signed in to change notification settings - Fork 476
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
Swagger decorator @ApiHeader is not including header on request #2906
Labels
Comments
Confirmed in the provided example: https://codesandbox.io/p/devbox/green-cache-5xjgvc |
github-project-automation
bot
moved this to 🤔 I'll investigate later
in My contributions to NestJS framework 😻
Oct 24, 2024
the OpenAPI spec generated looks like this: openapi: 3.0.0
paths:
/test:
get:
operationId: AppController_test
parameters:
- name: accept
required: true
in: header
schema:
type: string
responses:
'200':
description: ''
info:
title: Cats example
description: The cats API description
version: '1.0'
contact: {}
tags:
- name: cats
description: ''
servers: []
components:
schemas: {} And this is related with swagger-api/swagger-ui#5567 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
Current behavior
Swagger decorator @ApiHeader is not including header on request
Code
Result
Minimum reproduction code
https://codesandbox.io/p/devbox/green-cache-5xjgvc
Steps to reproduce
Just create a new NestJS project and add a new Controller like
TemplateController
above.Expected behavior
Expect that Swagger UI to include the proper
accept
value on request.Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
@nestjs/swagger
NestJS version
10.3.3
Packages versions
Node.js version
18.12.0
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: