use of org.raml.jaxrs.generator.builders.resources.ResourceBuilder in project raml-for-jax-rs by mulesoft-labs.
the class ResourceHandler method handle.
public void handle(final Resource resource) {
GAbstractionFactory factory = new GAbstractionFactory();
ResourceBuilder rg = new ResourceBuilder(build, factory.newResource(build, resource), resource.resourcePath(), resource.relativeUri().value());
build.newResource(rg);
}
use of org.raml.jaxrs.generator.builders.resources.ResourceBuilder in project raml-for-jax-rs by mulesoft-labs.
the class RamlV10 method buildResourceV10.
public static void buildResourceV10(Object test, String raml, CodeContainer<TypeSpec> container, String name, String uri) throws IOException {
Api api = buildApiV10(test, raml);
CurrentBuild currentBuild = new CurrentBuild(api, ExtensionManager.createExtensionManager());
currentBuild.constructClasses(new V10Finder(null, api));
ResourceBuilder builder = new ResourceBuilder(currentBuild, new V10GResource(currentBuild, new GAbstractionFactory(), api.resources().get(0)), name, uri);
builder.output(container);
}
use of org.raml.jaxrs.generator.builders.resources.ResourceBuilder in project raml-for-jax-rs by mulesoft-labs.
the class RamlV08 method buildResourceV08.
public static void buildResourceV08(Object test, String raml, CodeContainer<TypeSpec> container, String name, String uri) throws IOException {
Api api = buildApiV08(test, raml);
V08TypeRegistry registry = new V08TypeRegistry();
V08Finder typeFinder = new V08Finder(api, new GAbstractionFactory(), registry);
CurrentBuild currentBuild = new CurrentBuild(null, ExtensionManager.createExtensionManager());
currentBuild.constructClasses(typeFinder);
ResourceBuilder builder = new ResourceBuilder(currentBuild, new V08GResource(new GAbstractionFactory(), api.resources().get(0), typeFinder.globalSchemas().keySet(), registry), name, uri);
builder.output(container);
}
use of org.raml.jaxrs.generator.builders.resources.ResourceBuilder in project raml-for-jax-rs by mulesoft-labs.
the class ResourceHandler method handle.
public void handle(Set<String> globalSchemas, V08TypeRegistry registry, final org.raml.v2.api.model.v08.resources.Resource resource) {
GAbstractionFactory factory = new GAbstractionFactory();
ResourceBuilder rg = new ResourceBuilder(build, factory.newResource(globalSchemas, registry, resource), resource.displayName(), resource.relativeUri().value());
build.newResource(rg);
}
Aggregations