Swagger and OpenAPI
You can generate bricks from Swagger / OpenAPI definition.
The file shall be in JSON. YAML files can easily be converted to JSON using e.g. Swagger Editor.
Here is how to integrate such APIs. As you can see, it generates the business models for the requests and responses objects, the getters and setters interfacing objects to HTTP(S) requests including the automated parsing of JSON to those objects.
This tutorial shows how this works in more details.