mirror of
https://github.com/docker/docs.git
synced 2026-04-12 14:25:46 +07:00
Also enforce a max complexity for functions and add some new tests for config. Signed-off-by: Daniel Nephin <dnephin@docker.com>
31 lines
615 B
JSON
31 lines
615 B
JSON
{
|
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
"id": "service_schema.json",
|
|
|
|
"type": "object",
|
|
|
|
"allOf": [
|
|
{"$ref": "fields_schema.json#/definitions/service"},
|
|
{"$ref": "#/definitions/constraints"}
|
|
],
|
|
|
|
"definitions": {
|
|
"constraints": {
|
|
"id": "#/definitions/constraints",
|
|
"anyOf": [
|
|
{
|
|
"required": ["build"],
|
|
"not": {"required": ["image"]}
|
|
},
|
|
{
|
|
"required": ["image"],
|
|
"not": {"anyOf": [
|
|
{"required": ["build"]},
|
|
{"required": ["dockerfile"]}
|
|
]}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|