Skip to content

Commit 004e124

Browse files
authored
rest-api-spec: remove required: false for query parameters (#134658)
The vast majority of query parameters are not required, but most of them don't specify it. Removing "required": false entirely will help generation.
1 parent 1923634 commit 004e124

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+13
-110
lines changed

rest-api-spec/src/main/resources/rest-api-spec/api/cat.ml_data_frame_analytics.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"params": {
3838
"allow_no_match": {
3939
"type": "boolean",
40-
"required": false,
4140
"description": "Whether to ignore if a wildcard expression matches no configs. (This includes `_all` string or when no configs have been specified)"
4241
},
4342
"bytes": {

rest-api-spec/src/main/resources/rest-api-spec/api/cat.ml_datafeeds.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"params": {
3838
"allow_no_match": {
3939
"type": "boolean",
40-
"required": false,
4140
"description": "Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)"
4241
},
4342
"format": {

rest-api-spec/src/main/resources/rest-api-spec/api/cat.ml_jobs.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"params": {
3838
"allow_no_match": {
3939
"type": "boolean",
40-
"required": false,
4140
"description": "Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"
4241
},
4342
"bytes": {

rest-api-spec/src/main/resources/rest-api-spec/api/cat.ml_trained_models.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"params": {
3838
"allow_no_match": {
3939
"type": "boolean",
40-
"required": false,
4140
"description": "Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified)",
4241
"default": true
4342
},

rest-api-spec/src/main/resources/rest-api-spec/api/cat.transforms.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,14 @@
3737
"params": {
3838
"from": {
3939
"type": "int",
40-
"required": false,
4140
"description": "skips a number of transform configs, defaults to 0"
4241
},
4342
"size": {
4443
"type": "int",
45-
"required": false,
4644
"description": "specifies a max number of transforms to get, defaults to 100"
4745
},
4846
"allow_no_match": {
4947
"type": "boolean",
50-
"required": false,
5148
"description": "Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)"
5249
},
5350
"format": {

rest-api-spec/src/main/resources/rest-api-spec/api/indices.resolve_index.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@
5252
},
5353
"mode": {
5454
"type": "enum",
55-
"options": ["standard", "time_series", "logsdb", "lookup"],
55+
"options": [
56+
"standard",
57+
"time_series",
58+
"logsdb",
59+
"lookup"
60+
],
5661
"default": "",
5762
"description": "Filter indices by index mode. Comma-separated list of IndexMode. Empty means no filter."
5863
}

rest-api-spec/src/main/resources/rest-api-spec/api/inference.delete.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,11 @@
4646
"params": {
4747
"dry_run": {
4848
"type": "boolean",
49-
"description": "If true the endpoint will not be deleted and a list of ingest processors which reference this endpoint will be returned.",
50-
"required": false
49+
"description": "If true the endpoint will not be deleted and a list of ingest processors which reference this endpoint will be returned."
5150
},
5251
"force": {
5352
"type": "boolean",
54-
"description": "If true the endpoint will be forcefully stopped (regardless of whether or not it is referenced by any ingest processors or semantic text fields).",
55-
"required": false
53+
"description": "If true the endpoint will be forcefully stopped (regardless of whether or not it is referenced by any ingest processors or semantic text fields)."
5654
}
5755
}
5856
}

rest-api-spec/src/main/resources/rest-api-spec/api/ml.close_job.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@
3333
"params": {
3434
"allow_no_match": {
3535
"type": "boolean",
36-
"required": false,
3736
"description": "Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"
3837
},
3938
"force": {
4039
"type": "boolean",
41-
"required": false,
4240
"description": "True if the job should be forcefully closed"
4341
},
4442
"timeout": {

rest-api-spec/src/main/resources/rest-api-spec/api/ml.delete_datafeed.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"params": {
3131
"force": {
3232
"type": "boolean",
33-
"required": false,
3433
"description": "True if the datafeed should be forcefully deleted"
3534
}
3635
}

rest-api-spec/src/main/resources/rest-api-spec/api/ml.delete_expired_data.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,10 @@
3939
"params": {
4040
"requests_per_second": {
4141
"type": "number",
42-
"required": false,
4342
"description": "The desired requests per second for the deletion processes."
4443
},
4544
"timeout": {
4645
"type": "time",
47-
"required": false,
4846
"description": "How long can the underlying delete processes run until they are canceled"
4947
}
5048
},

0 commit comments

Comments
 (0)