raml-java-parser
raml-java-parser copied to clipboard
URI parameter of type file
Affects: 1.0.0
Issue
URI parameters should never be of type file unless I'm mistaken.
How to reproduce
RAML file
#%RAML 1.0
title: My API title
/fileInUriParam/{file}:
uriParameters:
file: file
Java file
package com.restlet.definitions.raml10.reader;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.raml.v2.api.RamlModelBuilder;
import org.raml.v2.api.RamlModelResult;
import org.raml.v2.api.model.v10.api.Api;
import static org.junit.Assert.fail;
public class Test {
@org.junit.Test
public void test() throws Exception {
String savedRamlLocation = Test.class.getResource("fileName").toString();
RamlModelResult ramlModelResult = new RamlModelBuilder().buildApi(savedRamlLocation);
if (ramlModelResult.hasErrors()) {
return;
}
fail("Should not pass parser validation");
}
}
Aha! Link: https://mulesoft-roadmap.aha.io/features/APIRAML-121
That may also hold true for headers and query parameters ?