There is a need to use external JSON schema(s) to describe data in RAML API interfaces.
The schema is expected to reside inside a jar file which attached to a module as a regular dependency.
If the above is not achievable – propose any options of how external schemas can be used in a module with minimal effort
1. Include JSON schemas as a dependency to the module using maven plugins
- add a dependency to the target module
- include following plugins to the .pom file
- Add a plugin to unpack RAML and JSON files
This plugin unpack the files of particular dependency
- Сlean up the folder
the following property seems not working for the maven-dependency-plugin
this means that every time you need to build the project you have to remove the folder manually.
To simply this process add the maven-clean-plugin to do it automatically by specifying the folder
- Add the ant-run plugin
After the module builds, all references to files will point to exact files in the current system:
which is not convenient to use in case of the different build environments.
The following plugin task will replace found lines, specifying the path to file and cut it to leave only the file name.
- No need to modify RMB module
- Insert a bunch of plugins to every module needed
- maintain regex in case of change
2. Add plugin to RMB to manage references
- Changes done in RMB will apply to all modules, which are used it
- Need to modify RMB module
- Need to investigate the amount of changes to RMB
3. Add schemas to RAML module
- All needed files stored in one place and modules can access it as other schemas already stored in RAML module
- Raml module will store additional files, which probably not all of the modules are interested in.