Grunt wrapper for Dredd API Blueprint tester
This plugin requires Grunt ~0.4.5
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-dredd --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-dredd');
In your project's Gruntfile, add a section named dredd
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
dredd: {
options: {
// Task-specific options go here.
}
},
});
Type: Integer
Default value: 3000
An integer value that is used to open the apimock server.
Type: String
Default value: ./api/api.apib
A string value that represents the path to the API Blueprint file.
For a list of options available for Dredd, please check out Dredd Command Line Options.
In this example, the default options are used to test an API Blueprint definition against a server running with the default options
grunt.initConfig({
dredd: {
options: {}
},
});
In this example, custom options are used to test an API Blueprint definition against a server running on localhost, port 3000.
grunt.initConfig({
dredd: {
options: {
server: 'http://localhost:3000',
src: './api/another_api.apib',
}
},
});
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
v0.1.0 - Initial release