Create Virtual Service from RAML throws parsing error

Document ID : KB000113004
Last Modified Date : 04/09/2018
Show Technical Document Details
Issue:
When creating a virtual service from a RAML file throws the below parsing error.

ava.lang.Exception: RAML failed to parse 
at com.itko.lisa.vse.stateful.protocol.http.RAMLPanel.processNewRAML(RAMLPanel.java:503) 
at com.itko.lisa.vse.stateful.protocol.http.RAMLPanel.processRAMLChangeAndSelect(RAMLPanel.java:364) 
at com.itko.lisa.vse.stateful.protocol.http.RAMLPanel.setRAMLUrl(RAMLPanel.java:784) 
at com.itko.lisa.vse.stateful.protocol.http.RAMLPanel$1.actionPerformed(RAMLPanel.java:171) 
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) 
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) 
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) 
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) 
at javax.swing.AbstractButton.doClick(AbstractButton.java:376) 
 
Environment:
All supported DevTest environments.
Cause:
One cause could be the "protocols" property is not defined properly.

As per RAML spec, the protocols property MUST be an array of strings of values "HTTP" and/or "HTTPS" : Protocols. Optionally, a RESTful API can be reached via HTTP, HTTPS, or both. The protocols property MAY be used to specify the protocols that an API supports. If the protocols property is not specified, the protocol specified at the baseUri property is used. 

If the protocols property is specified as below in the RAML file, this could be causing the RAML parsing error.
protocols: HTTPS
Resolution:
Changing the protocols property in RAML file as below will resolve the issue.

protocols: HTTPS ===> protocols: [HTTPS]