[Solved] Generate Models from Swagger
# help-with-other
c
Just trying to save time really, does anyone have any recommendations for ingesting a Swagger endpoint and producing C# models from it? Thanks 🙂
s
Always used NSwag for that
c
Anyone used Kiota?
s
It's OpenAPI so I searched for OpenAPI C# codegen and came across this, haven't used it but looks very active: https://github.com/OpenAPITools/openapi-generator
The other one is indeed NSwag that I see everywhere.
c
In the end I just made calls with Postman, copied the reponse into Chat GPT and asked it to write the C# Models. Worked a dream 🙂
Means I don't have a black box for my API calls that I can't debug. Much less code.
3 Views