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
There are ways of generating client code automatically from an OpenAPI spec, yeah
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.
thanks for the reply! if its a complex API with alot of models, would you recomend this? o would you recomend another one? 😊
They all mostly do the same tbh
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 />
i saw orvall don't support c#, open-api does, do you recomend nswag? kiota feels like much more hard to understand
NSwag is fine too
I used openapi-generator before, it was dead easy to set up and run.