Re:Ask HN: Best practices (and examples) for designing clien...
by BerislavLopac on Sunday May 24, 2020 @05:31AM
(#23290352)
If you are lucky enough that your API vendor provides an OpenAPI (aka Swagger) specification (or possibly API Blueprint or RAML, if nothing else), make sure you build your client to follow the spec. Even if you are possibly aware of some undocumented features, try to avoid relying on them -- they might change or disappear without a notice.
I would also highly recommend to use the spec to dynamically construct your requests. I don't know if PHP has libraries to assist with that, but for example in Python you could use tools like Bravado or Pyotr client.
I would also highly recommend to use the spec to dynamically construct your requests. I don't know if PHP has libraries to assist with that, but for example in Python you could use tools like Bravado or Pyotr client.