screwdriver-data-schema 23.1.0 → 23.2.0

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/config/base.js CHANGED
@@ -67,7 +67,7 @@ const SCHEMA_CONFIG_PRE_TEMPLATE_MERGE = Joi.object()
67
67
  .keys({
68
68
  template: Joi.string().regex(Regex.FULL_TEMPLATE_NAME_WITH_NAMESPACE),
69
69
  version: Joi.number().integer().min(1).max(50),
70
- annotations: Annotations.annotations.when('template', { is: Joi.exist(), then: Joi.forbidden() }),
70
+ annotations: Annotations.annotations,
71
71
  jobs: SCHEMA_JOBS.when('template', { is: Joi.exist(), then: Joi.forbidden(), otherwise: Joi.required() }),
72
72
  shared: Joi.when('template', {
73
73
  is: Joi.exist(),
@@ -78,11 +78,11 @@ const SCHEMA_CONFIG_PRE_TEMPLATE_MERGE = Joi.object()
78
78
  }),
79
79
  otherwise: SCHEMA_SHARED
80
80
  }),
81
- cache: SCHEMA_CACHE.when('template', { is: Joi.exist(), then: Joi.forbidden() }),
82
- childPipelines: SCHEMA_CHILD_PIPELINES.when('template', { is: Joi.exist(), then: Joi.forbidden() }),
81
+ cache: SCHEMA_CACHE,
82
+ childPipelines: SCHEMA_CHILD_PIPELINES,
83
83
  stages: SCHEMA_STAGES.when('template', { is: Joi.exist(), then: Joi.forbidden() }),
84
- subscribe: SCHEMA_SUBSCRIBE.when('template', { is: Joi.exist(), then: Joi.forbidden() }),
85
- parameters: Parameters.parameters.default({}).when('template', { is: Joi.exist(), then: Joi.forbidden() })
84
+ subscribe: SCHEMA_SUBSCRIBE,
85
+ parameters: Parameters.parameters.default({})
86
86
  })
87
87
  .unknown(false);
88
88
 
@@ -1,17 +1,20 @@
1
1
  'use strict';
2
2
 
3
3
  const Joi = require('joi');
4
- const JobsSchema = require('./base').jobs;
5
- const Shared = require('./base').shared;
4
+ const BaseSchema = require('./base');
5
+ const Annotations = require('./annotations');
6
6
  const Parameters = require('./parameters');
7
7
  const Template = require('./template');
8
8
  const Regex = require('./regex');
9
9
 
10
10
  const SCHEMA_CONFIG = Joi.object()
11
11
  .keys({
12
- jobs: JobsSchema.required(),
13
- shared: Shared,
14
- parameters: Parameters.parameters.default({})
12
+ jobs: BaseSchema.jobs.required(),
13
+ shared: BaseSchema.shared,
14
+ parameters: Parameters.parameters.default({}),
15
+ annotations: Annotations.annotations,
16
+ cache: BaseSchema.cache,
17
+ subscribe: BaseSchema.subscribe
15
18
  })
16
19
  .unknown(false);
17
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screwdriver-data-schema",
3
- "version": "23.1.0",
3
+ "version": "23.2.0",
4
4
  "description": "Internal Data Schema of Screwdriver",
5
5
  "main": "index.js",
6
6
  "scripts": {