Releases: dadi/api
Version 1.3.0
Fix #13: Removed auto-creation of API docs path (should only happen if api-doc module is installed)
Close #14: Load domain-specific configuration if matching file exists
Close #16: Check that generated auth token doesn't already exist, generate new one if it does
Close #18: Validate skip
& page
parameters before calling model.find()
Close #19: Database replicaSet
property should be a String, not a Boolean
Cache: add Redis caching ability and extend config to allow switching between filesystem and Redis caches
Cache: locate endpoint matching the request URL using path-to-regex so we can be certain of a match
Version 1.2.0
Exports
config
, connection
, log
and model
modules are all exported, and can be accessed as follows:
var config = require('dadi-api').Config;
var connection = require('dadi-api').Connection;
var model = require('dadi-api').Model;
var log = require('dadi-api').Log;
Model.find()
- collection setting
defaultFilters
now used when performing a GET request, in addition to filters passed in the querystring - collection setting
fieldLimiters
now used when performing a GET request, in addition to fields passed in the querystring skip
can be passed in the querystring to explicitly set an offset. Theskip
value is normally calculated using thecount
andpage
values, so ifcount = 10
andpage = 2
thenskip
becomes10
(i.e.(page-1)*count
). Ifskip
is specified in the querystring, this value is added to the calculated value to avoid overlapping records on subsequent pages.
Validation
the limt
and validationRule
schema properties have been deprecated in favour of the below. Not all rules are required, of course:
validation: {
minLength: 1,
maxLength: 20,
regex: {
pattern: /^abc/
}
}
First Public Release
v1.1.3 Version 1.1.3
Beta Version 0.2.0
This release is the first for the reconfigured API application, now able to be installed as a node module.
It includes:
- config exposed from the main module
var config = require('dadi-api').Config
- Document
compose
made more robust - New global route to retrieve all collection endpoints:
/api/collections
- New collection route to retrieve MongoDB stats:
/1.0/databaseName/collectionName/stats