2.1.0 • Published 6 years ago
metarpheus v2.1.0
metarpheus
A JS API for metarpheus.
It exposes a single function:
run(paths: string[], config?: Config): API
where:
pathsis a list of absolute paths to analyze (they can be files or directories)configoptional is a configuration with the following (optional) keys:modelsForciblyInUse: a list of models that are included even if unused by the exposed API.discardRouteErrorModels(defaultfalse): set totrueto discard models that are only used for route error types
and API is an object composed by two fields:
models: a list of models exposed by the API (or forcibly included, see above)routes: a description of the HTTProutesavailable
Example:
const { run } = require('metarpheus');
const paths = [
'/Users/example/buildo/project/api/src/main/scala'
];
const config = {
modelsForciblyInUse: ['Swan']
};
const { models, routes } = run(paths, config);
console.log(JSON.stringify(models, null, 2), JSON.stringify(routes, null, 2));2.1.0
6 years ago
2.0.0
6 years ago
1.3.5
7 years ago
1.3.4
7 years ago
1.3.3
7 years ago
1.3.2
7 years ago
1.3.1
7 years ago
1.3.0
7 years ago
1.2.0
7 years ago
1.1.0
7 years ago
1.0.0
7 years ago
0.1.10
7 years ago
0.1.9
7 years ago
0.1.8
8 years ago
0.1.7
8 years ago
0.1.6
8 years ago
0.0.4-alpha
8 years ago
0.0.3-alpha
8 years ago
0.0.2-alpha
8 years ago
0.0.1-alpha
8 years ago