phonemyatt
phonemyatt

Reputation: 1377

Swagger Codegen For Nestjs

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?

Upvotes: 6

Views: 7236

Answers (4)

d9k
d9k

Reputation: 2094

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

Upvotes: 0

tanius
tanius

Reputation: 16869

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.

Upvotes: 0

NickSim
NickSim

Reputation: 156

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)

Upvotes: 2

Willian
Willian

Reputation: 3415

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

Upvotes: 0

Related Questions