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

[BUG] When exposing the api-docs (options.exposeApiDocs) there's a host flag which is not openapi3.0 valid #174

Closed
Blacklegions opened this issue Aug 3, 2021 · 3 comments · Fixed by #175
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Blacklegions
Copy link

Describe the bug
When accessing the swagger page, a host parameter is added to the SwaggerObject. This parameter is then shown on the api-docs page which is not OpenApi3.0 complient. Which means we can't copy the api-docs into a client generator.

To Reproduce
Go on the swagger page, and afterwards on the api-docs page. It will be the last paramenter at the bottom.
If you go directly on the api-docs page without passing by the swagger page first the parameter will not be there (On server start)

Expected behavior
The host parameter should not be there in the api-docs page.

Screenshots
http://localhost:3000/v3/api-docs
image

Swagger io validator [https://editor.swagger.io/]
image

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
@kevinccbsg
Copy link
Member

Hi @Blacklegions,

Oh, you mean with the export in the endpoint. We normally get that info using the event emitter https://brikev.github.io/express-jsdoc-swagger-docs/#/eventEmitter but I think we can solve your 🐛

We will keep this issue updated. It should not be hard, we have to filter the object we exposed.

@kevinccbsg kevinccbsg added bug Something isn't working good first issue Good for newcomers labels Aug 3, 2021
@Blacklegions
Copy link
Author

Thank you for your quick response. I will take a look

@kevinccbsg
Copy link
Member

I will do a release now I hope that solves the issue. Please don't hesitate to re-open in case it is not fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants