use of org.raml.jaxrs.generator.v10.ResourceHandler in project raml-for-jax-rs by mulesoft-labs.
the class RamlScanner method handle.
public void handle(org.raml.v2.api.model.v10.api.Api api) throws IOException {
CurrentBuild build = new CurrentBuild(api, ExtensionManager.createExtensionManager());
configuration.setupBuild(build);
build.constructClasses(new V10Finder(build, api));
ResourceHandler resourceHandler = new ResourceHandler(build);
// handle resources.
for (Resource resource : api.resources()) {
resourceHandler.handle(resource);
}
build.generate(configuration.getOutputDirectory());
}
use of org.raml.jaxrs.generator.v10.ResourceHandler in project raml-for-jax-rs by mulesoft-labs.
the class RamlScanner method handle.
public void handle(org.raml.v2.api.model.v08.api.Api api) throws IOException {
GAbstractionFactory factory = new GAbstractionFactory();
V08TypeRegistry registry = new V08TypeRegistry();
V08Finder typeFinder = new V08Finder(api, factory, registry);
CurrentBuild build = new CurrentBuild(null, ExtensionManager.createExtensionManager());
configuration.setupBuild(build);
build.constructClasses(typeFinder);
ResourceHandler resourceHandler = new ResourceHandler(build);
// handle resources.
for (org.raml.v2.api.model.v08.resources.Resource resource : api.resources()) {
resourceHandler.handle(typeFinder.globalSchemas().keySet(), registry, resource);
}
build.generate(configuration.getOutputDirectory());
}
Aggregations