new ResourceLoader()

Description
Resource loader utility

Members


<static, readonly> TYPES

Properties
Name Type Description
TYPES Array.<string>

Methods


<static> statusCodeRoute( req, res, next )

Description
Hanlde Route Http Config yaml
Parameters
Name Type Description
req Express.Request Request
res Express.Response Response
next function Next route

<static> acceptedTypes( req ) → {Array.<string>}

Description
Determinates mock types to seek based on accept request header
Parameters
Name Type Description
req Express.Request Request
Returns

<static> autoParse( content, fileExtension ) → {Object}

Description
Recognize content type and returns it parsed
Parameters
Name Type Description
content string Raw content to parse
fileExtension string fileExtension
Returns

<static> statusCodeRoute( req, res, next )

Description
Hanlde Route Http response raw body (json/xml etc) and request json-schema validation
Parameters
Name Type Description
req Express.Request Request
res Express.Response Response
next function Next route