Swagger Codegen For Nestjs
Asked Answered
G

4

6

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?

Gower answered 26/8, 2019 at 3:41 Comment(1)
This is not available yet.Gower
P
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)

Protect answered 1/11, 2020 at 2:50 Comment(0)
M
0

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

Mufi answered 21/4, 2020 at 5:18 Comment(0)
R
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.

Rosser answered 11/1, 2023 at 23:59 Comment(1)
Tried this. It does not worked for me.Kerrill
M
0

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

Ms answered 3/3, 2023 at 14:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.