Package org.raml.model.parameter

Examples of org.raml.model.parameter.FormParameter


    @Test
    public void roundtrip()
    {
        MimeType mimeType = new MimeType();
        mimeType.setFormParameters(buildMap(Collections.singletonList(new FormParameter())));

        Action action = new Action();
        action.setBody(buildMap(mimeType));
        action.setResponses(buildMap(new Response()));
View Full Code Here


    {
        Raml raml = parseRaml("org/raml/params/parameter-multi-type.yaml");

        Map<String, List<FormParameter>> formParameters = raml.getResources().get("/simple").getAction(POST).getBody().get("multipart/form-data").getFormParameters();

        FormParameter uriParameter = formParameters.get("acl").get(0);
        Assert.assertThat(uriParameter.getType(), CoreMatchers.is(ParamType.STRING));

        List<FormParameter> file = formParameters.get("file");
        Assert.assertThat(file.size(), CoreMatchers.is(2));

        uriParameter = file.get(0);
        Assert.assertThat(uriParameter.getType(), CoreMatchers.is(ParamType.STRING));

        uriParameter = file.get(1);
        Assert.assertThat(uriParameter.getType(), CoreMatchers.is(ParamType.FILE));
    }
View Full Code Here

TOP

Related Classes of org.raml.model.parameter.FormParameter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.