Search in sources :

Example 11 with Api

use of org.raml.v2.api.model.v08.api.Api 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)

Example 12 with Api

use of org.raml.v2.api.model.v08.api.Api in project access-modifier by kohsuke.

the class Caller2 method x.

static void x() {
    Api x = null;
    // should fail
    x.notReallyPublic();
}
Also used : Api(api.Api)

Aggregations

Api (org.raml.v2.api.model.v10.api.Api)9 Test (org.junit.Test)7 CurrentBuild (org.raml.jaxrs.generator.CurrentBuild)6 GAbstractionFactory (org.raml.jaxrs.generator.GAbstractionFactory)6 TrialResourceClassExtension (org.raml.jaxrs.generator.builders.extensions.resources.TrialResourceClassExtension)2 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 V10Finder (org.raml.jaxrs.generator.v10.V10Finder)2 Api (api.Api)1 File (java.io.File)1 IOException (java.io.IOException)1 ParameterEmitter (org.raml.jaxrs.emitters.ParameterEmitter)1 TrialResourceMethodExtension (org.raml.jaxrs.generator.builders.extensions.resources.TrialResourceMethodExtension)1 TrialResponseClassExtension (org.raml.jaxrs.generator.builders.extensions.resources.TrialResponseClassExtension)1 TrialResponseMethodExtension (org.raml.jaxrs.generator.builders.extensions.resources.TrialResponseMethodExtension)1 V08Finder (org.raml.jaxrs.generator.v08.V08Finder)1 V08GResource (org.raml.jaxrs.generator.v08.V08GResource)1 V08TypeRegistry (org.raml.jaxrs.generator.v08.V08TypeRegistry)1 ResourceHandler (org.raml.jaxrs.generator.v10.ResourceHandler)1