Join Discord
Communities
Powered by
[Solved] Generate Models from Swagger
# help-with-other
c
Craig100
11/27/2024, 12:19 PM
Just trying to save time really, does anyone have any recommendations for ingesting a Swagger endpoint and producing C# models from it? Thanks 🙂
s
Steven (he/him)
11/27/2024, 12:34 PM
Always used NSwag for that
c
Craig100
11/28/2024, 10:03 AM
Anyone used Kiota?
s
Sebastiaan
11/28/2024, 12:17 PM
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
Sebastiaan
11/28/2024, 12:17 PM
The other one is indeed NSwag that I see everywhere.
c
Craig100
12/01/2024, 11:54 PM
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 🙂
Craig100
12/01/2024, 11:55 PM
Means I don't have a black box for my API calls that I can't debug. Much less code.
3
Views
Previous
Next