by moonchild · 6y ago · 0 comments
+-----------+ +--------------+ +-----------------+
|Web Browser| |Smartphone App| |Client Libraries/|
+-----+-----+ +------+-------+ |Other API code |
| | +-------+---------+
| v |
| +-----+------+ |
+--------->+ Steveslist +<-----------+
| Servers |
+------------+
Why not this? +-----------+ +-----------------+ +--------------+
|Web Browser|-->|Client Libraries/|<--|Smartphone App|
+-----------+ |Other API code | +--------------+
+-------+---------+
|
v
+-----+------+
| Steveslist |
| Servers |
+------------+See openapi/swagger for good examples how client generation works
Of course, the generated client is not very convenient, being a 1-to-1 mapping with the API. You build a high-level client with the more common operations on top of the generated one.
It's possible to do this in a way that gets you the best of both approaches, with some up-front planning.
That stuff is only done at the end unless you're chargin for that at the beginning.
If you're not B2B positioned, you probably won't have a client library for a while.