Search in sources :

Example 6 with CurrentBuild

use of org.raml.jaxrs.generator.CurrentBuild in project raml-for-jax-rs by mulesoft-labs.

the class V10GResourceTest method extendingResponse.

@Test
public void extendingResponse() throws Exception {
    Api api = RamlV10.buildApiV10(this, "resource-response-extending.raml");
    GAbstractionFactory fac = new GAbstractionFactory();
    V10GResource gr = new V10GResource(new CurrentBuild(api, null), fac, api.resources().get(0));
    GResponseType req = gr.methods().get(0).responses().get(0).body().get(0);
    assertEquals("application/json", req.mediaType());
    assertEquals("ObjectBase", req.type().type());
    assertEquals("FunPut200ApplicationJson", req.type().name());
    assertEquals("model.FunPut200ApplicationJson", req.type().defaultJavaTypeName("").toString());
}
Also used : CurrentBuild(org.raml.jaxrs.generator.CurrentBuild) GAbstractionFactory(org.raml.jaxrs.generator.GAbstractionFactory) GResponseType(org.raml.jaxrs.generator.ramltypes.GResponseType) Api(org.raml.v2.api.model.v10.api.Api) Test(org.junit.Test)

Aggregations

CurrentBuild (org.raml.jaxrs.generator.CurrentBuild)6 GAbstractionFactory (org.raml.jaxrs.generator.GAbstractionFactory)6 Api (org.raml.v2.api.model.v10.api.Api)5 Test (org.junit.Test)4 ResourceBuilder (org.raml.jaxrs.generator.builders.resources.ResourceBuilder)2 GRequest (org.raml.jaxrs.generator.ramltypes.GRequest)2 GResponseType (org.raml.jaxrs.generator.ramltypes.GResponseType)2 V08Finder (org.raml.jaxrs.generator.v08.V08Finder)1 V08GResource (org.raml.jaxrs.generator.v08.V08GResource)1 V08TypeRegistry (org.raml.jaxrs.generator.v08.V08TypeRegistry)1 V10Finder (org.raml.jaxrs.generator.v10.V10Finder)1 V10GResource (org.raml.jaxrs.generator.v10.V10GResource)1 Api (org.raml.v2.api.model.v08.api.Api)1