This is a tool to help validate your Apigility implementation against a RAML specification. This way you can make sure the implementation matches the specification requirements.
In comparison with similar tools this application does not check the output of the api but the code structure directly.
Please note that this tool is in early stages of development.
composer require --dev "robertboloc/apigility-raml-validator"
chmod +x vendor/bin/apigility-raml-validator
vendor/bin/apigility-raml-validator [--help] [-s spec, --spec spec] [-p project, --project project]
Path to the RAML specification file
Path to the Apigility project containing the source code
Hint the name of the module in case it's different from the API name
Display the usage message
Enable debug messages when running the application
This is the list of fields from the RAML specification currently being validated
RAML | Apigility |
---|---|
title | Check a module matching title exists |
version | Check a version folder matching version exists |
resource * | Check a route has been defined for the resource |
method | Check a collection route implements the methods of a top resource |
* only top level resources are detected for now
Highlighted in green are the lines of the RAML specification currently being validated against the implementation
#%RAML 1.0
+ title: Test
+ version: v1
- protocols: HTTPS
- mediaType: application/json
- baseUri: https://api.test.com/{version}
- description: My Test API
+ /foo:
+ get:
+ description: My test endpoint
+ /bar:
+ post:
+ description: Another test endpoint