5

I have created apis endpoint with Swaggerhub and successfully exported to run with asp.net core. I want to test the same apis with nestjs but i found documenting with openapi but not the other way round; convert yaml to nodejs.Is there a way to generate to nestjs with typescript from OpenAPI3.0 schema?

phonemyatt
  • 1,287
  • 17
  • 35

4 Answers4

2

Swagger Codegen does not offer Nestjs generator at the moment. Here is a related request but no one seems to have found the time to make the contribution yet: https://github.com/swagger-api/swagger-codegen/issues/9559

UPDATE: there's PR to add a Nestjs generator in OpenAPI Generator (a community fork of Swagger Codegen)

NickSim
  • 156
  • 6
0

I believe Swagger-js-codegen can help you achieve this.

Willian
  • 3,011
  • 1
  • 15
  • 38
0

Now there seems to be one project, as far as I can see, that can generate Nest.js code from a Swagger / OpenAPI spec file:

It's called swagger-nestjs-codegen. See here on Github and here on npmjs.com. I have yet to test it, though.

tanius
  • 14,003
  • 3
  • 51
  • 63
0

Found swagger-nestjs-codegen, 11 stars, korean comments

d9k
  • 1,476
  • 3
  • 15
  • 28