152 lines
4.0 KiB
YAML
152 lines
4.0 KiB
YAML
# Copyright 2017 AT&T Intellectual Property. All other rights reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
---
|
|
schema: deckhand/DataSchema/v1
|
|
metadata:
|
|
name: deckhand/Base/v1
|
|
schema: metadata/Control/v1
|
|
data:
|
|
$schema: http://json-schema.org/schema#
|
|
|
|
definitions:
|
|
parent_selector_requires_actions:
|
|
dependencies:
|
|
# Requires that if parentSelector is provided, then actions is
|
|
# required and must contain at least 1 item.
|
|
parentSelector:
|
|
required:
|
|
- actions
|
|
actions_requires_parent_selector:
|
|
dependencies:
|
|
# Requires that if actions are provided, then so too must
|
|
# parentSelector.
|
|
actions:
|
|
required:
|
|
- parentSelector
|
|
substitution_dest:
|
|
type: object
|
|
properties:
|
|
path:
|
|
type: string
|
|
pattern:
|
|
type: string
|
|
additionalProperties: false
|
|
required:
|
|
- path
|
|
|
|
properties:
|
|
schema:
|
|
type: string
|
|
pattern: ^[A-Za-z]+/[A-Za-z]+/v\d+$
|
|
metadata:
|
|
type: object
|
|
properties:
|
|
schema:
|
|
anyOf:
|
|
- type: string
|
|
pattern: ^metadata/Document/v\d+$
|
|
- type: string
|
|
pattern: ^metadata/Control/v\d+$
|
|
name:
|
|
type: string
|
|
labels:
|
|
type: object
|
|
replacement:
|
|
type: boolean
|
|
layeringDefinition:
|
|
type: object
|
|
properties:
|
|
layer:
|
|
type: string
|
|
abstract:
|
|
type: boolean
|
|
parentSelector:
|
|
type: object
|
|
minProperties: 1
|
|
actions:
|
|
type: array
|
|
minItems: 1
|
|
items:
|
|
type: object
|
|
properties:
|
|
method:
|
|
enum:
|
|
- replace
|
|
- delete
|
|
- merge
|
|
path:
|
|
type: string
|
|
additionalProperties: false
|
|
required:
|
|
- method
|
|
- path
|
|
additionalProperties: false
|
|
allOf:
|
|
- $ref: "#/definitions/parent_selector_requires_actions"
|
|
- $ref: "#/definitions/actions_requires_parent_selector"
|
|
substitutions:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
dest:
|
|
anyOf:
|
|
- $ref: "#/definitions/substitution_dest"
|
|
- type: array
|
|
minItems: 1
|
|
items:
|
|
$ref: "#/definitions/substitution_dest"
|
|
src:
|
|
type: object
|
|
properties:
|
|
schema:
|
|
type: string
|
|
pattern: ^[A-Za-z]+/[A-Za-z]+/v\d+$
|
|
name:
|
|
type: string
|
|
path:
|
|
type: string
|
|
additionalProperties: false
|
|
required:
|
|
- schema
|
|
- name
|
|
- path
|
|
additionalProperties: false
|
|
required:
|
|
- dest
|
|
- src
|
|
storagePolicy:
|
|
type: string
|
|
enum:
|
|
- encrypted
|
|
- cleartext
|
|
additionalProperties: false
|
|
required:
|
|
- schema
|
|
- name
|
|
data:
|
|
type:
|
|
- "null"
|
|
- string
|
|
- integer
|
|
- array
|
|
- object
|
|
|
|
additionalProperties: false
|
|
required:
|
|
- schema
|
|
- metadata
|
|
- data
|