Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A bit more standard way of generating HTTP API clients, would be to use openapi spec [1] and then generate php client. It makes you app client independent of framework and also language itself.

[1] https://github.com/OpenAPITools/openapi-generator



This is the approach I use, but I've always found some sort of issue in every generator I use. A valid openapi spec does not imply a generator will be able to handle it. You'd think have a specification would mean the generators are "bug free" but it's not the case, and bug reports are lost in a sea of issues: https://github.com/OpenAPITools/openapi-generator/issues so i don't see things improving anytime soon.

I've also wondered if the "logic-less" template approach is the right approach for these generators. You can't fix bugs or add workarounds just by providing a custom template, you need to change the underlying Java code to provide the correct data models to the logic-less templates.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: