nestjs / swagger

OpenAPI (Swagger) module for Nest framework (node.js) :earth_americas:
https://nestjs.com
MIT License
1.68k stars 469 forks source link

Support `openapi-snippet` or document request snippet usage #1545

Closed RobertLowe closed 3 years ago

RobertLowe commented 3 years ago

I'm submitting a...


[ ] Regression
[ ] Bug report
[X] Feature request
[X] Documentation issue or request
[ ] Support request

Current behavior

Swagger module UI snippet only shows request snippets for curl

Desired behavior

Swagger module to support additional snippets utilizing openapi-snippet, so different targets may be auto-generated.

What is the motivation / use case for changing the behavior?

When you have an organization with lots of developers/stakeholders with different skills-sets (data-science, backend, etc), it's useful to provide a snippet in their most used language.

I purpose we support openapi-snippet (https://www.npmjs.com/package/openapi-snippet) or document how to utilize it, or document how to add additional request snippets.

The library currently supports:

Thank you for your time in considering this request.

kamilmysliwiec commented 3 years ago

Thanks for your suggestion!

This has been discussed in the past and we decided to not implement it in the foreseeable future.

If you think your request could live outside Nest's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.