screwdriver-api 7.0.138 → 7.0.139

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screwdriver-api",
3
- "version": "7.0.138",
3
+ "version": "7.0.139",
4
4
  "description": "API server for the Screwdriver.cd service",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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').parsePipelineTemplate;
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) {