About Generating RAML-based Flows
From a RAML specification, the APIkit scaffolding technique typically generates the following components in APIkit 4.x:
Basic configuration files plus a Mule XML configuration (Mule code)
An implementation of the API
HTTP listener and APIkit router
For routing and binding to RAML resources.
An API Console
For simulating calls to the API using the mocking service.
A mock implementation. Later you need to add the business logic to the flows.
In Studio, the APIkit project looks something like this:
A flow is generated for each resource method:
The generated, minimal flows meets the communication operations required by a REST contract.
The APIkit router is a key message processor that validates requests against the RAML definition, enriches messages, for example by adding default values to the messages, and routes requests to a flow. "Bad request" is returned if the request is invalid, for example, and "Not implemented" is returned if the RAML resource that you request is not associated with a flow.