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

Interface and model generation from swagger #380

Open
tibitoth opened this issue Oct 12, 2017 · 6 comments
Open

Interface and model generation from swagger #380

tibitoth opened this issue Oct 12, 2017 · 6 comments

Comments

@tibitoth
Copy link

Hi, Is there any plan to support interface (and model) generation from swagger to refit?

@tibitoth tibitoth changed the title Interface generation from swagger Interface and model generation from swagger Oct 12, 2017
@jjwilliams42
Copy link
Contributor

Not sure if you were aware, but there is a project for generating client libraries for a swagger api.

https://github.com/swagger-api/swagger-codegen

@tibitoth
Copy link
Author

tibitoth commented Nov 7, 2017

I know this but maybe we can create a generator for refit too.

@0xced
Copy link
Contributor

0xced commented Feb 12, 2019

I haven't used it, but I found https://github.com/itofinity/swagger-csharp-refit which seems to produce interfaces and models from a swagger definition.

GitHub
Contribute to itofinity/swagger-csharp-refit development by creating an account on GitHub.

@RobJohnston
Copy link

See also OpenAPITools/openapi-generator#3581

@Dreamescaper
Copy link
Contributor

Dreamescaper commented Jan 25, 2021

Some time ago I've created small dotnet tool to generate Refit interfaces from ASP.NET Core projects.
It doesn't support swagger, and it doesn't generate DTO models (as the intention is to reuse same requests/responses), but maybe it would be useful to someone.
https://github.com/Dreamescaper/GenerateAspNetCoreClient

GitHub
DotNet tool to generate HTTP client classes from ASP.NET Core api controllers. - Dreamescaper/GenerateAspNetCoreClient

@christianhelle
Copy link

christianhelle commented Mar 8, 2023

I have only recently discovered Refit and also created a small dotnet CLI tool to generate a Refit interface and contracts from OpenAPI (Swagger) specifications.

I hope it's useful to someone.

https://github.com/christianhelle/refitter

GitHub
Refit Client SDK Generator for OpenAPI. Contribute to christianhelle/refitter development by creating an account on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants