This topic explains how to create virtual assets from a RAML definition.
Sections include:
Virtualize can automatically create a .pva based on the endpoints found in a RAML description. Each .pva generated via the RAML wizard will contain Message Responders for all of the defined endpoints.
RAML 0.8 and 1.0 are supported.
This is especially helpful if the service you want to virtualize is not available for live recording, but you have access to a definition file that describes it.
There are two main steps involved in virtualizing the application behavior from a definition file:
To automatically create Message Responders from a RAML definition:
Virtualize will then create one Message Responder configured for each resource/method/status code in the RAML definition. A sample message (if available) is included in the response. If the service definition includes a schema, that schema is used to construct and constrain the response.
You can use the available controls to specify the response messages. For more details about reviewing and customizing the options in the tools that are created, see Message Responder Overview.
If the .pva is created directly in the VirtualAssets project, it will be deployed automatically. Otherwise, the simplest way to deploy the virtual asset is to copy the containing .pva file into the VirtualAssets project.
Alternatively, you could right-click the Virtualize Server view’s Local machine node, choose Add Virtual Asset, specify the .pva file that includes the virtual assets you want to deploy, then click Finish. When the wizard completes, Virtualize will automatically copy the .pva file to the VirtualAssets project.
For a more detailed discussion of deployment procedures and options, see Deploying Virtual Assets.
For details on how to customize the Message Responder’s behavior, see Message Responder Overview.