I'm currently exploring options for creating a Typescript client from our .NET API. After researching various tools, I decided to go with Autorest, as it is Node-based and fits my skillset. While I am aware of Swashbuckle, my knowledge leans more towards Node than Java.
Our API has versioning in place, with most endpoints residing under V1
(e.g. /v1/users
). However, some have been updated and are now under V2
(e.g. /v2/users
).
In Swagger/OpenAPI, only the following links are provided:
- http://localhost:5000/swagger/v1/swagger.json
- http://localhost:5000/swagger/v2/swagger.json
Unfortunately, neither of these JSON files includes all endpoints. They need to be consolidated into a single file for full endpoint coverage.
How can I use Autorest to generate clients for both V1 and V2 simultaneously? Running the tool separately for each version results in the first being overwritten. Is there a way to coexist?
What would be the best approach in this situation? Should the backend be responsible for aggregating all V1 endpoints under V2? Is there a solution that allows Autorest to handle both versions at once?