RM-5875 add Swagger version to exception message

This commit is contained in:
Sara Aspery
2017-11-16 09:51:13 +00:00
parent 2ffb75aa06
commit 5e3692ff60

View File

@@ -70,11 +70,13 @@ public class BaseYamlUnitTest
try
{
// check the yaml file is valid against Swagger JSON schema
assertTrue("Yaml file is not a valid Swagger file: " + yamlFilePath, validateYamlFile(yamlFilePath, swaggerSchema));
assertTrue("Yaml file is not valid Swagger " + OPEN_API_SPECIFICATION + ": " + yamlFilePath,
validateYamlFile(yamlFilePath, swaggerSchema));
// check can read the swagger object to obtain the swagger version
Swagger swagger = new SwaggerParser().read(yamlFilePath);
assertEquals("Failed to obtain Swagger version from yaml file " + yamlFilePath, swagger.getSwagger(), OPEN_API_SPECIFICATION);
assertEquals("Failed to obtain Swagger version from yaml file " + yamlFilePath,
swagger.getSwagger(), OPEN_API_SPECIFICATION);
}
catch (ParserException ex)
{