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

How to generate Nodejs SDK with nestia using Nestjs swagger json url of Nestjs project? #1006

Closed
anshshah016 opened this issue Aug 30, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@anshshah016
Copy link

anshshah016 commented Aug 30, 2024

I want to create an SDK from the Swagger JSON URL of my NestJS project's deployed backend.
For example: https://demovoucherapi.ogstack.com/api/swagger-json.

When I generate the SDK using a Swagger JSON file, it works fine. However, if the JSON file changes (e.g., due to the addition of new endpoints in my NestJS project), I need to regenerate the SDK with the updated Swagger JSON file.

Is there a feature or tool that allows generating an SDK directly from the Swagger JSON URL? This way, even if there are changes in my project and the Swagger definition gets updated, I could rebuild the SDK using the same Swagger URL.

Additionally, if I generate the SDK using a Swagger JSON file, how can I rebuild the SDK if there are changes in that JSON file? Is there a way to automate the regeneration process whenever the Swagger JSON file is updated?

Is there any configuration we can add to the swagger.json file for proper method naming?

Looking forward to your response.
Thank you in advance!

@Tokirkhokhar
Copy link

I'm facing a similar challenge with my NestJS project and would like to contribute to the discussion.

I'm also looking for a way to create an SDK directly from the Swagger JSON URL of my deployed backend. Currently, I regenerate the SDK manually whenever there are changes to the Swagger JSON file, which is not ideal for maintaining consistency.

so Is there a feature or tool that allows generating an SDK directly from the Swagger JSON URL?

@samchon samchon self-assigned this Sep 2, 2024
@samchon samchon added the enhancement New feature or request label Sep 2, 2024
@samchon
Copy link
Owner

samchon commented Sep 2, 2024

Now, you can insert URL value into the @nestia/migrate.

https://nestia.io/docs/migrate/

@samchon samchon closed this as completed in 846a9a0 Sep 2, 2024
@github-project-automation github-project-automation bot moved this from To do to Done in Nestia v3 Update Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants