This procedure describes how to create a virtual service image from RESTful API modeling language (RAML).
A RAML can define message bodies using a combination of Schema and Example properties. The Example property is used for the transaction body in DevTest. Make sure to specify the Example property in a message body, or else the Schema property is used instead.
Important! The Schema property is not interpreted in any way and appears exactly as specified in the transaction body within DevTest.
Follow these steps:
The Virtual Service From RAML window opens.
Note: To load parameters from a previously saved service image, click Load from File at the bottom of the window.
For more information about field descriptions, see Basics Tab.
You can also select the RAML from the drop-down list, or click the Browse button to locate the RAML from the file system.
This entry can be a RAML file on the file system or a URL.
DevTest parses the RAML and populates the Endpoint field and the Methods pane.
Note: If DevTest fails to parse the RAML, a warning icon displays after the Endpoint field. To view the error message, click the warning icon.
By default, all the methods are selected. You can click Select All or Select None, as appropriate. At least one method is required.
On the next window, the service image is generated and the wizard is finished.
To save the settings on this recording to load to another service image recording, click Save above the Finish button.
Note: The parameter lisa.vse.rest.max.optionalqueryparams specifies the maximum number of optional query parameters to process per method in a RAML file. The default is five; any optional parameters after the fifth one are ignored. We recommend that you do not change the value above five. This can result in the number of generated responses growing exponentially after the fifth one.
Copyright © 2014 CA Technologies.
All rights reserved.
|
|