screwdriver-api 7.0.138 → 7.0.140
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const boom = require('@hapi/boom');
|
|
4
4
|
const schema = require('screwdriver-data-schema');
|
|
5
5
|
const templateSchema = schema.api.templateValidator;
|
|
6
|
-
const pipelineValidator = require('screwdriver-template-validator').
|
|
6
|
+
const pipelineValidator = require('screwdriver-template-validator').validatePipelineTemplate;
|
|
7
7
|
|
|
8
8
|
module.exports = () => ({
|
|
9
9
|
method: 'POST',
|
|
@@ -15,8 +15,8 @@ module.exports = () => ({
|
|
|
15
15
|
handler: async (request, h) => {
|
|
16
16
|
try {
|
|
17
17
|
const { yaml: templateString } = request.payload;
|
|
18
|
-
|
|
19
|
-
const result = await pipelineValidator(templateString);
|
|
18
|
+
const { templateFactory } = request.server.app;
|
|
19
|
+
const result = await pipelineValidator(templateString, templateFactory);
|
|
20
20
|
|
|
21
21
|
return h.response(result);
|
|
22
22
|
} catch (err) {
|