C
C#4mo ago
shynez

Is there a faster way to map endpoints?

Heelo peeps, im trying to map alot of endpoints from an API to consume with client. The thing is that there are alot of endpoints and doing it one by one plus creating entities is alot. I have access to the json of the documentaion from OpenAPI swagger. What do you guys recomend me to do? thanks in advance
8 Replies
Angius
Angius4mo ago
There are ways of generating client code automatically from an OpenAPI spec, yeah
Angius
Angius4mo ago
Kiota for example
GitHub
GitHub - microsoft/kiota: OpenAPI based HTTP Client code generator
OpenAPI based HTTP Client code generator. Contribute to microsoft/kiota development by creating an account on GitHub.
shynez
shynezOP4mo ago
thanks for the reply! if its a complex API with alot of models, would you recomend this? o would you recomend another one? 😊
Angius
Angius4mo ago
They all mostly do the same tbh
Angius
Angius4mo ago
There's also Orval and openapi-generator for example
orval
orval is able to generate client with appropriate type-signatures (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in yaml or json formats. 🍺
Hello from OpenAPI Generator | OpenAPI Generator
Description will go into a meta tag in <head />
shynez
shynezOP4mo ago
i saw orvall don't support c#, open-api does, do you recomend nswag? kiota feels like much more hard to understand
Angius
Angius4mo ago
NSwag is fine too
SleepWellPupper
SleepWellPupper4mo ago
I used openapi-generator before, it was dead easy to set up and run.

Did you find this page helpful?