Closed
Description
The official generator is doing really weird stuff with what seems like it should be a pretty standard AnyOf situation. So far we're hacking around it, but it's not sustainable.
It's time to trot out the alternative generators again and see how they fare.
- https://github.com/drwpow/openapi-typescript
- https://github.com/ferdikoomen/openapi-typescript-codegen
- https://loopback.io/doc/en/lb4/OpenAPI-generator.html (kind of dubious, seems like you might have to use loopback for your server?)
- https://github.com/acacode/swagger-typescript-api
Note that some generators, like the official one, generate request methods that wrap fetch
for us. Others just generate all the types for the requests and responses, but wiring up fetch
es would be manual. This is not necessarily a dealbreaker — customizing fetch could potentially be a good thing (though it probably isn't) and there may be a way to add our own generation for the wrappers so that even though we're responsible for it, at least it's automatic.