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

Using multiple @ApiExtensions results in only the first being rendered. #1637

Closed
2 of 4 tasks
adworacz opened this issue Oct 23, 2021 · 3 comments
Closed
2 of 4 tasks

Comments

@adworacz
Copy link

adworacz commented Oct 23, 2021

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When using the Swagger CLI plugin and adding multiple @ApiExtension's to a controller method, only one (the first) is rendered properly. Commenting out either one causes the other to be rendered correctly, so it's not a bug with how the extension is being created.

Example code:

  @Put()
  @ApiExtension('x-special-extension', 'foo')
  @ApiExtension('x-extra-special-widget', { 'harry': 'potter' })
  putThing(): string {
    return 'hello world'
  }

Which produces:

"put": {
        "x-special-extension": "foo"
}

Minimum reproduction code

See above.

Steps to reproduce

No response

Expected behavior

"put": {
        "x-special-extension": "foo",
        "x-extra-special-widget": { "harry": "potter" }
}

Package version

5.1.3

NestJS version

8.0.11

Node.js version

14.18.1

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

@adworacz
Copy link
Author

Lordy I missed this as well - looks like this PR will fix it: #1525

@micalevisk
Copy link
Member

micalevisk commented Oct 23, 2021

I guess you can close this one

duplicated of #1524

@adworacz
Copy link
Author

Roger, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants