Copyright (C) 2017-2022 The Open Library Foundation
This software is distributed under the terms of the Apache License, Version 2.0. See the file "LICENSE" for more information.
This is a Maven archetype used to generate an RMB-based server-side module. Install this locally if you wish to build such a module.
RAML Module Builder (or RMB) is a Vert.x based toolkit that enables a module to:
- synthesize API endpoints (via a Java interface) based on a RAML document
- synthesize POJOs based on declared JSON schema definitions
- take advantage of other abstraction
For additional information on RMB, please refer to the README.
First, build and install this mod-rmb-template facility locally:
mvn clean install
On success, go to the root that will host your new project folder and run the following command.
artifactId follow the
mod- prefix naming convention.
mvn archetype:generate \
cd into the new project's directory.
Add the raml-util which provides resources shared by RAML-based FOLIO modules. NOTE: 20180910: use its "raml1.0" branch:
git submodule add https://github.com/folio-org/raml ramls/raml-util
git checkout raml1.0
git add ramls/raml-util
At this point, the new module is ready for initial compilation.
mvn clean install
NOTE: Once compiled, this new project will not have an actual API implementation. The Java interface files would have been generated into
target/generated-sources/raml-jaxrsbased on the provided RAML and Schema files.
Follow the RMB README to understand how it works.
Compare the files that were generated by this archetype with that explained in the RMB README and in the exemplar modules (mod-tags, mod-notify, and mod-notes) especially
Replace the basic RAML and schema files with ones to suit your project. Follow the RMB advice and investigate other modules.
Commence your API implementation: