The Linting utility for RESTful API Modelling Language (RAML).
RAML Enforcer is a command line tool for identifying and reporting on patterns found within RAML code. It supports:
- RAML 0.8
- RAML 1.0
Depending on your development environment, you will need either Docker or Git and Node.js (^8.10.0)
to be properly installed on your computer before RAML Enforcer can be run.
- Navigate to the directory containing your RAML Service Contract.
- Execute RAML Enforcer by running the following command, replacing
<main-raml-file-path>
with the path to your main RAML file inside the current directory:
sudo docker run --init --rm --volume $(pwd):/tmp "mikeyryan/raml-enforcer:latest" /tmp/<main-raml-file-path>
- Clone the source code repository:
git clone https://github.com/Mike-Gough/raml-enforcer
- Navigate to the cloned folder:
cd raml-enforcer
- Install the project dependancies using NPM:
npm install
- Execute RAML Enforcer by running the following command, replacing
<main-raml-file-path>
with the path to your main RAML file inside the current directory:
node raml-enforcer.js <main-raml-file-path>
RAML Enforcer allows you to pass Linting options as arguments to the command line to change the rules it will apply. Below is a brief description of the available arguments and their purpose:
Argument | Description |
---|---|
--no-color | do not use color in output |
--no-includes | do not report issues for include files |
--no-warnings | do not report warnings |
--no-errors | do not report errors |
--no-throw-on-warnings | do not exit with an exception when warnings occur |
--no-throw-on-errors | do not exit with an exception when errors occur |
--no-warn-old-raml-version | do not return a warning when an old RAML version is being used |