[7.x] json spec: allow null for documentation url (#55749) (#56625)

This commit allows the JSON schema's documentation.url property to have a null value.
This can useful for cases where a feature is under development, and does not have
documentation published yet.

This commit also adds a documentation.url for two ml resources.
This commit is contained in:
Jake Landis 2020-05-12 14:49:02 -05:00 committed by GitHub
parent 5f5a648b9a
commit 9c76ee47c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 7 deletions

View File

@ -43,6 +43,37 @@
"$ref": "#/definitions/Body"
}
},
"if": {
"properties": {
"stability": {
"const": "stable"
}
}
},
"then": {
"properties": {
"documentation": {
"$ref": "#/definitions/Documentation",
"properties": {
"url" : {
"type": ["string"]
}
}
}
}
},
"else": {
"properties": {
"documentation": {
"$ref": "#/definitions/Documentation",
"properties": {
"url" : {
"type": ["string", "null"]
}
}
}
}
},
"required": [
"documentation",
"stability",
@ -130,7 +161,6 @@
"additionalProperties": false,
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"description": {

View File

@ -159,7 +159,4 @@ testClusters.integTest {
}
}
validateRestSpec {
ignore 'ml.validate.json'
ignore 'ml.validate_detector.json'
}

View File

@ -1,7 +1,7 @@
{
"ml.validate":{
"documentation":{
"url":null,
"url":"https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html",
"description":"Validates an anomaly detection job."
},
"stability":"stable",

View File

@ -1,7 +1,7 @@
{
"ml.validate_detector":{
"documentation":{
"url":null,
"url":"https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html",
"description":"Validates an anomaly detection detector."
},
"stability":"stable",