Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
623 commits
Select commit Hold shift + click to select a range
5337adb
Update model info
stevejgordon Nov 9, 2021
2853193
Updates ML get buckets API specification (#1020) (#1025)
lcawl Nov 16, 2021
c12d4b7
Update model info
lcawl Nov 16, 2021
141fd30
Update rest-api-spec
github-actions[bot] Nov 16, 2021
c982208
Update model info
sethmlarson Nov 16, 2021
445c7c6
[7.16] Adds spec for update datafeed API (#1030)
lcawl Nov 17, 2021
6c2d196
Name unions and fix ambiguous types (#1027) (#1033)
swallez Nov 18, 2021
68a63c6
Update model info
swallez Nov 18, 2021
a5c3aca
[7.16] Many small fixes from running REST API tests
github-actions[bot] Nov 19, 2021
cd0612c
Update model info
sethmlarson Nov 19, 2021
958fd8d
[7.16] Adds missing model snapshot parameters and descriptions (#1029)
github-actions[bot] Nov 19, 2021
9240d55
Update model info
sethmlarson Nov 19, 2021
46d6bfc
[7.16] Add missing request body detail for ML get APIs (#1037) (#1040)
lcawl Nov 19, 2021
e0b0e82
Update model info
lcawl Nov 19, 2021
1985c59
Refactor and fix multi* APIs (#1034) (#1042)
swallez Nov 22, 2021
e055e07
Update model info
swallez Nov 22, 2021
3f3e1e9
[7.16] Add 'fleet.global_checkpoints' API
github-actions[bot] Nov 22, 2021
b443d7c
Update model info
sethmlarson Nov 22, 2021
1e33dbe
Add missing TermVectorOption enum member (#1044) (#1045)
github-actions[bot] Nov 22, 2021
b82ef26
Update model info
swallez Nov 22, 2021
e1d313b
Unify Operator and DefaultOperator enums (#1047) (#1048)
swallez Nov 23, 2021
e704aa6
Update model info
swallez Nov 23, 2021
51a4dc1
Unify all health status enums as a single type (#1046) (#1049)
swallez Nov 23, 2021
d28ec88
Update model info
swallez Nov 23, 2021
9072feb
Unify ScoreMode, ChildScoreMode & move sort to common types (#1052) (…
swallez Nov 23, 2021
bf244e4
Update model info
swallez Nov 23, 2021
a7c861e
Add missing "defaults" field to IndexState (#1054) (#1055)
github-actions[bot] Nov 23, 2021
271e05e
Update model info
swallez Nov 23, 2021
465552e
Fix some index setting fields (#1056) (#1057)
swallez Nov 23, 2021
d1c14fa
Update rest-api-spec 7.16 (#1051)
github-actions[bot] Nov 23, 2021
2817bc6
Update model info
delvedor Nov 23, 2021
193f6b6
Adds descriptions to delete transform API (#1070) (#1071)
lcawl Nov 29, 2021
c99cfc6
Update model info
lcawl Nov 29, 2021
d7603a8
Adds visibility tag to ML validate APIs (#1063) (#1073)
lcawl Nov 29, 2021
157a9bf
Update model info
lcawl Nov 29, 2021
45de7d0
Add spec source location to type definitions (#1065) (#1082)
swallez Nov 30, 2021
e150cdd
[Backport 7.16] Adds missing details in the create transform API (#1086)
github-actions[bot] Nov 30, 2021
f033f8d
Update model info
lcawl Nov 30, 2021
da81c88
[7.16] Adds missing ML API intros (#1085)
lcawl Nov 30, 2021
fdaa0ea
Update model info
lcawl Nov 30, 2021
98036c3
Adds descriptions for start and stop transform APIs (#1072) (#1087)
lcawl Nov 30, 2021
6c97d16
Update model info
lcawl Nov 30, 2021
61b7428
[7.16] Remove source parameters from update_by_query/delete_by_query
sethmlarson Dec 1, 2021
a011f83
Update model info
sethmlarson Dec 1, 2021
2c54422
Fix body definition of 'ml.get_overall_buckets'
sethmlarson Dec 2, 2021
d706e60
Update model info
sethmlarson Dec 2, 2021
8a8fe9d
[7.16] Fix ssl.certificates response
github-actions[bot] Dec 2, 2021
c17bc8b
Update model info
sethmlarson Dec 2, 2021
726bb7c
[7.16] Update rest-api-spec
github-actions[bot] Dec 3, 2021
fe71493
Update model info
sethmlarson Dec 3, 2021
3dbb154
[Backport 7.16] Adds missing timeout parameter to transform APIs (#1100)
lcawl Dec 3, 2021
1da0906
Update model info
lcawl Dec 3, 2021
a85a708
[Transform] Updates GET and GET stats Transform API specs. (#1103)
szabosteve Dec 7, 2021
ddf26d9
Updates schema.
szabosteve Dec 7, 2021
6cb9532
Update model info
szabosteve Dec 7, 2021
9e2da32
[7.16] [DOCS] Add descriptions to clean up snapshot repo API
sethmlarson Dec 7, 2021
b0b8b1b
Update model info
sethmlarson Dec 7, 2021
1163fc7
[7.16]Adds upgrade transform specification (#1108)
lcawl Dec 9, 2021
a79c38d
Update model info
lcawl Dec 9, 2021
183359a
Updates preview and update Transform API specs. (#1107)
szabosteve Dec 10, 2021
869381e
Updates spec.
szabosteve Dec 10, 2021
cec5938
Update model info
szabosteve Dec 10, 2021
5dce690
Update rest-api-spec 7.16 (#1110)
github-actions[bot] Dec 14, 2021
b0a71f1
Update model info
delvedor Dec 14, 2021
f18bf8e
[7.16] Fix 'security.authenticate' API response
github-actions[bot] Dec 14, 2021
41bd78f
Update model info
sethmlarson Dec 14, 2021
a72bd0a
[Backport 7.16] Fix nodes.stats API (#1116)
Anaethelion Dec 14, 2021
014ca10
Update model info
Anaethelion Dec 14, 2021
24cd5f5
[7.16] HitsMetadata.total is not present if track_total_hits == false
sethmlarson Dec 14, 2021
9c824dd
Update model info
sethmlarson Dec 14, 2021
4546216
Update rest-api-spec
github-actions[bot] Dec 16, 2021
19e8d2a
Update model info
sethmlarson Dec 16, 2021
7b1b3ee
[7.16] Improve descriptions for mget API
sethmlarson Dec 16, 2021
f3a2281
Update model info
sethmlarson Dec 16, 2021
3122f13
[7.16] Add 'encoded' property to SecurityCreateApiKeyResponse
github-actions[bot] Dec 16, 2021
5a46ebd
Update model info
sethmlarson Dec 16, 2021
4b09e95
Add missing "wrapper" query type (#1132) (#1135)
github-actions[bot] Dec 16, 2021
8f9f908
Update model info
swallez Dec 16, 2021
7495bed
[Backport 7.17] query.wrapper should be optional (#1139)
github-actions[bot] Dec 16, 2021
5de46d6
Update model info
delvedor Dec 16, 2021
c27d433
[Backport 7.17] All container properties must be optional (#1143)
github-actions[bot] Dec 16, 2021
37e84e8
Update model info
delvedor Dec 16, 2021
30049fd
[Backport 7.17] Fix typo in CombinedFieldsQuery (#1152)
github-actions[bot] Dec 20, 2021
ac9779d
Update model info
delvedor Dec 20, 2021
87fb997
[Backport 7.17] Generate Id as string|number in TypeScript (#1156)
github-actions[bot] Dec 20, 2021
42801d2
[Backport 7.17] Minor type fixes (#1162)
github-actions[bot] Dec 21, 2021
2ac41e0
Update model info
delvedor Dec 21, 2021
9f6f27b
Fix ilm.explain_lifecycle (#1159) (#1164)
github-actions[bot] Dec 21, 2021
124e1b4
Update model info
philkra Dec 21, 2021
3135fe1
MGet Request & Response and Makefile improvements (#1157) (#1168)
github-actions[bot] Dec 21, 2021
a191e50
fix ilm.get_lifecycle (#1169) (#1172)
github-actions[bot] Dec 21, 2021
3bb4290
Update model info
philkra Dec 21, 2021
ccd5b68
Improve type validation DX (#1174)
delvedor Dec 22, 2021
b4dd558
[Backport 7.17] Use codegen name in ts generator (#1186)
github-actions[bot] Dec 23, 2021
0b01335
[Backport 7.17] Add descriptions for ilm.put_lifecycle (#1192)
github-actions[bot] Dec 23, 2021
f98bc17
Update model info
delvedor Dec 23, 2021
903c8fc
[Backport 7.17] Use nvmrc to specify the require node version (#1197)
github-actions[bot] Dec 23, 2021
d4f4c7b
Fix nodes.info response (#1209) (#1211)
github-actions[bot] Dec 23, 2021
2182ef2
Update model info
philkra Dec 23, 2021
6212a63
GA: Automatically use latest major version in main (#1216)
delvedor Dec 27, 2021
22f46b4
Fix response parser
delvedor Dec 27, 2021
9241f90
Check nodejs version before running the compiler (#1219) (#1220)
github-actions[bot] Dec 27, 2021
e0236b8
Upgrade node and deps (#1222)
delvedor Dec 28, 2021
9e394c7
Suggest the correct API name if the input is wrong (#1225) (#1226)
github-actions[bot] Dec 28, 2021
7d0487f
Validate both request and response at the same time (#1227) (#1228)
github-actions[bot] Dec 28, 2021
a09a49b
Single bucket aggregates have nested aggregates (#1243) (#1249)
github-actions[bot] Jan 12, 2022
ed1390d
Update model info
swallez Jan 12, 2022
849848d
Fix regression in aggregation changes (#1242) (#1256)
stevejgordon Jan 13, 2022
37433b6
Update model info
stevejgordon Jan 13, 2022
256a0da
Address some of the Top 20 APIs (#1235) (#1258)
swallez Jan 13, 2022
076e4b7
Update model info
swallez Jan 13, 2022
b1b12d0
Change timestamps defined as integer to long (#1250) (#1252)
swallez Jan 17, 2022
9666f1e
Update model info
swallez Jan 17, 2022
6ae03c3
Fix node shard node_id (#1268)
swallez Jan 18, 2022
4c2b655
Update model info
swallez Jan 18, 2022
487ddcf
[Backport 7.17] Make transport_id accept an array for transforms.get_…
github-actions[bot] Jan 19, 2022
1e028fd
Update model info
delvedor Jan 19, 2022
e889548
Add an optional key field to RangeBucket (#1279) (#1281)
swallez Jan 19, 2022
4ddd40b
Update model info
swallez Jan 19, 2022
0e6cb95
Fix chained transform definition (#1285) (#1287)
swallez Jan 20, 2022
6461b26
Update model info
swallez Jan 20, 2022
ebfaf7d
[Backport 7.17] Add ilm.migrate_to_data_tiers (#1291)
github-actions[bot] Jan 20, 2022
8811a6d
Update model info
delvedor Jan 20, 2022
a1e558a
[Backport 7.17] Add searchable_snapshots.cache_stats (#1294)
github-actions[bot] Jan 20, 2022
a87d329
Update model info
delvedor Jan 20, 2022
a0cd284
Fix suggest results that are a typed-key union type (#1301) (#1310)
swallez Jan 24, 2022
08a577b
Update model info
swallez Jan 24, 2022
67b54d5
Add UpdateAction for bulk requests (#1312) (#1316)
swallez Jan 24, 2022
f647250
Update model info
swallez Jan 24, 2022
f0ae86f
Make MultiSearchItem.status optional (#1320) (#1322)
github-actions[bot] Jan 25, 2022
9dcdca6
Update model info
swallez Jan 25, 2022
dbe26c5
[7.17] cat anomaly detectors specification (#1325)
lcawl Jan 25, 2022
615d0a4
Update model info
lcawl Jan 25, 2022
1af24af
Make snapshot info in CreateSnapshotResponse optional (#1326) (#1331)
github-actions[bot] Jan 25, 2022
87b75c4
Fixes TopHitsAggregate which a simple aggregate (no buckets) (#1327) …
github-actions[bot] Jan 25, 2022
004f845
Update model info
swallez Jan 25, 2022
6d678b2
[7.17] Update cat datafeeds specification (#1333)
lcawl Jan 25, 2022
b44f860
Update model info
lcawl Jan 25, 2022
d379517
Add missing fields to SearchTemplateResponse (#1335) (#1339)
swallez Jan 25, 2022
138840c
Update model info
swallez Jan 25, 2022
374b9dd
[Backport 7.17] Add admonition to cat ML specifications (#1340)
lcawl Jan 25, 2022
f06922d
Update model info
lcawl Jan 25, 2022
54f0e1c
Fix typo in CatAnomalyDetectorColumn (#1341) (#1343)
swallez Jan 25, 2022
e8ce4d2
Update model info
swallez Jan 25, 2022
f6f9533
[Backport 7.17] Allow to override a property type (#1347)
github-actions[bot] Jan 26, 2022
6b73347
Update model info
delvedor Jan 26, 2022
e98cc8d
[Backport 7.17] Update dependencies (#1353)
github-actions[bot] Jan 26, 2022
a3670ed
[Backport 7.17] Update snapshot.get endpoint (#1363)
github-actions[bot] Jan 27, 2022
fcdd5d2
Update model info
delvedor Jan 27, 2022
006de0d
Add @deprecated to indices.exists_type (#1373)
lcawl Jan 28, 2022
e022a38
Update model info
delvedor Jan 28, 2022
c1204a6
[7.17] Updates cat DFA API spec (#1376)
szabosteve Jan 28, 2022
17bcf10
Update model info
szabosteve Jan 28, 2022
a544166
[7.17] Updates cat transform API spec. (#1378)
szabosteve Jan 28, 2022
ab01585
Update model info
szabosteve Jan 28, 2022
40c63cc
Validate ml.get_jobs Response (#1372) (#1380)
github-actions[bot] Jan 31, 2022
094e88c
Update model info
philkra Jan 31, 2022
957de96
Remove version and hash from schema.json (#1385)
delvedor Feb 1, 2022
6dbcdc4
Update rest-api-spec 7.17 (#1387)
github-actions[bot] Feb 2, 2022
49f94a2
Missing migration types (#1393) (#1402)
github-actions[bot] Feb 7, 2022
d9e88bb
Add missing nodes.*_repositories_metering_* Endpoints (#1394) (#1404)
github-actions[bot] Feb 7, 2022
9a0d140
[Backport 7.17] Updated branch version detection (#1415)
github-actions[bot] Feb 9, 2022
b2dab0c
Update rest-api-spec data in 8.1 and 8.0 as well (#1420)
delvedor Feb 10, 2022
80fadd8
[Backport 7.17] Updated rest-api branch resolver (#1425)
github-actions[bot] Feb 10, 2022
e262c3f
Rename internal namespace (#1419)
delvedor Feb 10, 2022
8542c12
Add missing properties to SQL query API (#1431) (#1433)
github-actions[bot] Feb 10, 2022
49f6f61
[Backport 7.17] Add 'index-setting' to WaitForActiveShardOptions (#1441)
github-actions[bot] Feb 11, 2022
79a868f
indices.delete_index_template (#1439) (#1446)
github-actions[bot] Feb 11, 2022
1f2bd4f
Update rest-api-spec (#1454)
github-actions[bot] Feb 11, 2022
672900c
Remove _nodes property that exists in parent class (#1457) (#1459)
github-actions[bot] Feb 14, 2022
6f4f9b4
ml.get_filters (#1449) (#1462)
github-actions[bot] Feb 15, 2022
f03909c
transform.get_transform (#1455) (#1465)
github-actions[bot] Feb 15, 2022
f19e664
Backport 1476 to 7.17 (#1480)
Anaethelion Feb 15, 2022
1de02d2
Fix ml.get_model_snapshots Response (#1475) (#1482)
github-actions[bot] Feb 16, 2022
d2deba1
Updates schema. (#1488)
szabosteve Feb 17, 2022
cbbc1d9
Adopt new specLocation format (#1485)
delvedor Feb 17, 2022
2f60781
Use search ResponseBody in Scroll response (#1495)
delvedor Feb 24, 2022
2ca8952
[Backport 7.17] Add doc_id support to all types (#1511)
github-actions[bot] Mar 4, 2022
556c571
Fix doc_id handling in 7.17 (#1514)
delvedor Mar 4, 2022
c6c03fd
Change fields property in FieldsCapabilitiesRequest to required (#1522)
swallez Mar 4, 2022
f05cd46
Reindex source and dest fields are required (#1520) (#1527)
github-actions[bot] Mar 4, 2022
b38358c
Missing Index mapping settings (#1500) (#1543)
teldosas Mar 17, 2022
cc4883e
Add missing match_only_text field mapping (#1549) (#1551)
swallez Mar 21, 2022
f54d508
Missing ignore_unavailable query parameters on OpenPointInTimeRequest…
swallez Mar 22, 2022
8323709
Use correct type for Significant Terms Agg (#1556) (#1576)
github-actions[bot] Mar 23, 2022
ce63699
Allow quoted strings in comma-separated jstags (#1586) (#1587)
github-actions[bot] Mar 29, 2022
3cde16e
Add default value for internal tags (#1589) (#1591)
github-actions[bot] Mar 29, 2022
402f898
Remove generic property (#1595) (#1598)
stevejgordon Mar 31, 2022
ba6e7cc
Add score to CompletionSuggestOption (#1621) (#1629)
Anaethelion Apr 12, 2022
ce91238
[8.2] Add 'ignore_malformed' to MappingLimitSettings
sethmlarson Apr 12, 2022
4621772
Rename media fields (#1624)
delvedor Apr 13, 2022
8817477
[7.17] Add container_property variants to FieldSuggester
sethmlarson Apr 14, 2022
ea8352d
Add support for non exhaustive variants (#1662) (#1664)
swallez Apr 27, 2022
39072c7
[7.17] Misc fixes found validating Java client 8.2 (#1632) (#1665)
swallez Apr 28, 2022
900d4a7
Remove unnecessary ScoreFunctionBase (#1666) (#1667)
github-actions[bot] Apr 29, 2022
4619f9d
Add the "es_quirk" annotation to capture snowflakes in ES behavior (#…
swallez May 5, 2022
1f23bc4
[7.17] Add all properties to MultisearchBody
github-actions[bot] May 6, 2022
02fe66b
fix Multisearch header and body parameters (#1707) (#1708)
github-actions[bot] May 17, 2022
59a96d5
[Backport 7.17] Remove `Name` from `PropertyBase` (#1712)
stevejgordon May 17, 2022
d57a087
[7.17] Fix spec issues reported in the Java client (#1723) (#1725)
swallez May 24, 2022
d2edf35
Add ml.get_model_snapshot_upgrade_stats (#1732) (#1734)
Anaethelion Jun 1, 2022
d667664
Extract security.privileges.query in a typealias (#1735) (#1741)
Anaethelion Jun 3, 2022
d4e6f15
[7.17] Remove mention of only tracking 7.x
github-actions[bot] Jun 6, 2022
ff80fef
Misc java fixes 220617 (#1773) (#1774)
swallez Jun 28, 2022
cda51c1
Add note about AggregateOrder parsing lazyness (#1777) (#1778)
swallez Jun 30, 2022
984c219
Fix suggestion options and mapping char filter (#1783) (#1785)
swallez Jul 12, 2022
28c9813
Update rest-api-spec (#1814)
github-actions[bot] Aug 2, 2022
85133bd
Fix optional/missing fields reported via Java client issues (#1823) (…
swallez Aug 29, 2022
c32a25d
Add missing superclass to get_source request (#1867) (#1868)
github-actions[bot] Sep 12, 2022
c617d55
[7.17] Rename position_length to positionLength
github-actions[bot] Sep 13, 2022
9853348
[7.17] Make 'dir' optional on IcuTransformTokenFilter
sethmlarson Sep 26, 2022
776e05c
[validation-errors] Fixes in watcher API (#1889) (#1900)
Anaethelion Sep 27, 2022
5e90767
[7.17] Add collate_match and highlighted to SuggestionOptions
sethmlarson Oct 3, 2022
266b2a8
Fix issues in aggregations found with java-client+recordings (#1940) …
swallez Oct 5, 2022
834f234
Fix misc issues found with java-client+recordings (#1945) (#1950)
swallez Oct 6, 2022
aa86cda
SLM config and retention are optional (#1952)
github-actions[bot] Oct 6, 2022
6e5cc35
Start of fixes for core/search (#1947) (#1957)
swallez Oct 11, 2022
40f8b28
More fixes in the core and indices namespaces (#1958) (#1960)
swallez Oct 11, 2022
9db429d
IndicesPrivileges can contain multiple queries (#1963) (#1964)
github-actions[bot] Oct 17, 2022
f38c14e
Fix user privileges (#1966) (#1969)
swallez Oct 19, 2022
ecbb204
Fix optional Processor fields and add missing fields (#1970) (#1972)
swallez Oct 19, 2022
288e53d
Fix descriptions of only_managed and only_errors
github-actions[bot] Oct 27, 2022
3fce738
Remove local-metadata from PropertyBase (#1979) (#1987)
stevejgordon Nov 4, 2022
f59a1bd
Add property for MultiTerms aggregation (#2000) (#2004)
stevejgordon Dec 21, 2022
f141666
[Backport 7.17] Remove union for dynamic_templates (#2035)
stevejgordon Mar 14, 2023
3616459
Update Github Actions to ubuntu-latest
github-actions[bot] Apr 5, 2023
d17411e
Add features_states parameter in snapshot.restore (#2067) (#2068)
github-actions[bot] Apr 6, 2023
85a70ae
[7.17] Make StemmerTokenFilter.language optional
github-actions[bot] Apr 17, 2023
3f7a495
Convert IndexPrivilege and ClusterPrivilege to non-exhaustive enums (…
swallez Apr 26, 2023
31be3fc
Add exception to core.get to handle index_not_found & document not fo…
github-actions[bot] Jun 27, 2023
2d47903
Automatically compile/generate output artifacts on push to `main` (#2…
flobernd Jul 17, 2023
b46446b
Fix generation workflow
flobernd Jul 17, 2023
457d842
Change type from `boolean` -> `Stringified<boolean>` for `preserve_or…
github-actions[bot] Jul 17, 2023
a2c9529
Revert "Change type from `boolean` -> `Stringified<boolean>` for `pre…
flobernd Jul 17, 2023
4a27c63
Change TaskStatus to UserDefinedValue (#2250) (#2251) (#2272)
swallez Sep 7, 2023
029ebe9
Fix include type in Significant Text Agg (#2279) (#2292)
pquentin Sep 21, 2023
dc674ea
[7.17] Allow single fields in fields and _source parameters (#2332)
pquentin Nov 6, 2023
7b334ef
Revert "[7.17] Allow single fields in fields and _source parameters (…
pquentin Nov 7, 2023
6e51d84
[7.17] Add role_templates in SecurityPutRoleMappingRequest (#2357) (#…
pquentin Dec 7, 2023
57a5ad0
Fix FieldRule (#2362) (#2384)
github-actions[bot] Jan 15, 2024
a81e850
adding ignore_unmapped to GeoDistanceQuery (#2388) (#2391)
l-trotta Jan 17, 2024
4abdc6b
Fix script definition in processorcontainer (#2400)
l-trotta Jan 29, 2024
244c7ef
Merge branch 'backport-2400-to-7.17' into 7.17
l-trotta Jan 29, 2024
728bb10
added 'remove_binary' to AttachmentProcessor (issue #727)
l-trotta Feb 19, 2024
11a213c
making node info path optional (issue #242)
l-trotta Feb 2, 2024
b62d342
making node info discover seed_host optional (issue #242)
l-trotta Feb 5, 2024
e059817
changed description for update by query (issue #315)
l-trotta Feb 6, 2024
f193c22
initial_master_nodes from string to string[] (issue #242)
l-trotta Feb 19, 2024
587de6c
correct node info discover class (issue #242)
l-trotta Feb 19, 2024
d0b2ee3
generate and contrib
l-trotta Feb 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
output/dangling-types/dangling.csv linguist-generated=true
output/schema/schema.json linguist-generated=true
output/schema/validation-errors.json linguist-generated=true
output/typescript/types.ts linguist-generated=true
33 changes: 28 additions & 5 deletions .github/download-artifacts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,23 @@ const downloadedSpec = join(esFolder, 'rest-api-spec', 'api')
const specFolder = join(__dirname, '..', '..', 'specification', '_json_spec')

async function downloadArtifacts (opts) {
if (typeof opts.version !== 'string') {
throw new Error('Missing version')
if (typeof opts.version !== 'string' && typeof opts.branch !== 'string') {
throw new Error('Missing version or branch')
}

core.info('Checking out spec and test')

core.info('Resolving versions')
core.info('Resolving version')
let resolved
try {
resolved = await resolve(opts.version, opts.hash)
resolved = await resolve(opts.version || fromBranch(opts.branch), opts.hash)
} catch (err) {
core.error(err.message)
process.exit(1)
}

opts.version = resolved.version
core.info(`Resolved version ${opts.version}`)

core.info('Cleanup')
await rm(esFolder)
Expand Down Expand Up @@ -88,6 +89,16 @@ async function downloadArtifacts (opts) {
}

async function resolve (version, hash) {
if (version === 'latest') {
const response = await fetch('https://artifacts-api.elastic.co/v1/versions')
if (!response.ok) {
throw new Error(`unexpected response ${response.statusText}`)
}
const { versions } = await response.json()
version = versions.pop()
}

core.info(`Resolving version ${version}`)
const response = await fetch(`https://artifacts-api.elastic.co/v1/versions/${version}`)
if (!response.ok) {
throw new Error(`unexpected response ${response.statusText}`)
Expand Down Expand Up @@ -136,12 +147,24 @@ async function resolve (version, hash) {
}
}

function fromBranch (branch) {
if (branch === 'main') {
return 'latest'
} else if (branch === '7.x') {
return '7.x-SNAPSHOT'
} else if ((branch.startsWith('7.') || branch.startsWith('8.')) && !isNaN(Number(branch.split('.')[1]))) {
return `${branch}-SNAPSHOT`
} else {
throw new Error(`Cannot derive version from branch '${branch}'`)
}
}

async function main (options) {
await downloadArtifacts(options)
}

const options = minimist(process.argv.slice(2), {
string: ['id', 'version', 'hash']
string: ['id', 'version', 'hash', 'branch']
})
main(options).catch(t => {
core.error(t)
Expand Down
4 changes: 2 additions & 2 deletions .github/download-artifacts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"author": "",
"license": "ISC",
"dependencies": {
"@actions/core": "^1.2.7",
"@actions/core": "^1.6.0",
"cross-zip": "^4.0.0",
"minimist": "^1.2.5",
"node-fetch": "^2.6.1",
"node-fetch": "^2.6.7",
"rimraf": "^3.0.2"
}
}
6 changes: 0 additions & 6 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,3 @@ generator:typescript:

compiler:
- 'compiler/**/*'

backport-7.x:
# Add 'backport-7.x` label to any change to compiler/ts-generator files
# as long as the 'specification' hasn't changed
- any: ['compiler/**/*', 'typescript-generator/**/*']
all: ['!specification/**/*']
2 changes: 1 addition & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
backport:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
name: Backport
steps:
- name: Backport
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/code-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- name: Install
run: |
Expand Down
92 changes: 92 additions & 0 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Generate Output

on:
push:
branches:
- 'main'
- '7.17'
- '8.[0-9]+'

# For debugging purposes:
# pull_request:
# types: [opened, synchronize, reopened]
# branches:
# - main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

defaults:
run:
shell: bash

jobs:
build:
runs-on: ubuntu-latest
if: github.repository_owner == 'elastic' && github.actor != 'elasticmachine'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
persist-credentials: true

- name: Setup Node 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: npm
cache-dependency-path: '**/package-lock.json'

- name: Setup Dependencies
run: |
make setup

- name: Generate Output
run: |
make spec-compile
make spec-generate

- name: Check for Changed Files
id: changes
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "has-changes=1" >> $GITHUB_OUTPUT
fi

- name: Set Git Identity
if: steps.changes.outputs.has-changes == '1'
run: |-
git config --global user.email "elasticmachine@users.noreply.github.com"
git config --global user.name "Elastic Machine"

- name: Push Output
if: steps.changes.outputs.has-changes == '1'
run: |
cd ./output

git add -A
git commit -m "Update specification output"

git status

git push

# For debugging purposes:
# - name: Push Output
# if: steps.changes.outputs.has-changes == '1'
# env:
# BRANCH_NAME: output_${{ github.run_id }}_${{ github.run_attempt }}
# run: |
# cd ./output

# git fetch
# git switch main

# git add -A
# git commit -m "Update specification output"

# git status

# git push origin HEAD:refs/heads/${{ env.BRANCH_NAME }}
4 changes: 2 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- name: Install
run: |
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/output-check.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/update-model-info.yml

This file was deleted.

30 changes: 22 additions & 8 deletions .github/workflows/update-rest-api-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,51 @@ jobs:
update-rest-api:
name: Update rest-api-spec
runs-on: ubuntu-latest

strategy:
matrix:
branch: ['main', '8.1', '8.0', '7.17']

steps:
- uses: actions/checkout@v2
with:
ref: ${{ matrix.branch }}

- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- name: Install deps
run: |
npm install --prefix .github/download-artifacts
npm install --prefix compiler
npm install --prefix typescript-generator

- name: Download artifacts
run: |
node .github/download-artifacts/index.js --version 7.x-SNAPSHOT

node .github/download-artifacts/index.js --branch ${{ matrix.branch }}
- name: Generate output
run: |
SKIP_VERSION_UPDATE=true make contrib

- name: Debug git status
run: |
git status --porcelain

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
title: 'Update rest-api-spec'
title: Update rest-api-spec ${{ matrix.branch }}
body: 'As titled.'
commit-message: 'Update rest-api-spec'
labels: specification
delete-branch: true
team-reviewers: elastic/clients-team
branch: automated/rest-api-spec-update-${{ matrix.branch }}

- name: Open an issue if the action fails
if: ${{ failure() }}
uses: nashmaniac/create-issue-action@v1.1
with:
title: rest-api-spec update failed
token: ${{ secrets.GITHUB_TOKEN }}
labels: bug
body: The rest-api-spec action is currently failing, see [here](https://github.com/elastic/elasticsearch-specification/actions/workflows/update-rest-api-json.yml).
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,22 @@ dist/
flight-recorder-generator/output
*.d.ts
java-generator/*.js
package-lock.json
specification/**/*.js
specification/lib

.DS_Store

artifacts
.github/download-artifacts/package-lock.json

.validation.json
compiler/lib
typescript-generator/lib

report
output/schema/import-*
output/schema/schema-no-generics.json
.github/**/package-lock.json

# Editor lockfiles
.*.swp
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
Loading