File tree Expand file tree Collapse file tree 4 files changed +12
-12
lines changed
Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 11SHELL := /bin/bash
22
33validate : # # Validate a given endpoint request or response
4- @node compiler/run-validations.js --api $(api ) --type $(type ) --stack-version $(stack-version )
4+ @node compiler/run-validations.js --api $(api ) --type $(type ) --branch $(branch )
55
66validate-no-cache : # # Validate a given endpoint request or response without local cache
7- @node compiler/run-validations.js --api $(api ) --type $(type ) --stack-version $(stack-version ) --no-cache
7+ @node compiler/run-validations.js --api $(api ) --type $(type ) --branch $(branch ) --no-cache
88
99generate : # # Generate the output spec
1010 @echo " >> generating the spec .."
Original file line number Diff line number Diff line change @@ -204,16 +204,16 @@ git clone https://github.com/elastic/elasticsearch-specification.git
204204git clone https://github.com/elastic/clients-flight-recorder.git
205205
206206cd elasticsearch-specification
207- # this will validate the xpack.info request type against the 8.1.0 stack version
208- make validate api=xpack.info type=request stack-version=8.1.0-SNAPSHOT
207+ # this will validate the xpack.info request type against the main branch of Elasticsearch
208+ make validate api=xpack.info type=request branch=main
209209
210- # this will validate the xpack.info request and response types against the 8.1.0 stack version
211- make validate api=xpack.info stack-version =8.1.0-SNAPSHOT
210+ # this will validate the xpack.info request and response types against the 8.15 branch
211+ make validate api=xpack.info branch =8.15
212212```
213213
214214The last command above will install all the dependencies and run, download
215215the test recordings and finally validate the specification.
216- If you need to download the recordings again, run ` make validate-no-cache api=xpack.info type=request stack-version=8.1.0-SNAPSHOT ` .
216+ If you need to download the recordings again, run ` make validate-no-cache api=xpack.info type=request branch=main ` .
217217
218218Once you see the errors, you can fix the original definition in ` /specification `
219219and then run the command again until the types validator does not trigger any new error.
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ async function run () {
165165
166166 spinner . text = 'Running validations'
167167
168- const branchName = argv [ 'stack-version ' ] . startsWith ( '7.' ) ? '7.x' : argv [ 'stack-version' ] . slice ( 0 , 3 )
168+ const branchName = argv [ 'branch ' ] . startsWith ( '7.' ) ? '7.x' : argv [ 'branch' ]
169169
170170 if ( noCache || isStale || metadata . branchName !== branchName ) {
171171 metadata . lastRun = new Date ( )
@@ -175,7 +175,7 @@ async function run () {
175175 await $ `node ${ path . join ( uploadRecordingsPath , 'download.js' ) } --branch ${ branchName } `
176176
177177 spinner . text = 'Fetching artifacts'
178- await $ `node ${ path . join ( cloneEsPath , 'index.js' ) } --version ${ argv [ 'stack-version ' ] } `
178+ await $ `node ${ path . join ( cloneEsPath , 'index.js' ) } --branch ${ argv [ 'branch ' ] } `
179179 }
180180
181181 cd ( tsValidationPath )
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ The example assumes that you have already performed the necessary steps to run a
1616if not, take a look at the [ README] ( ./README.md ) .
1717
1818``` sh
19- make validate api=index type=request stack-version=8.1.0-SNAPSHOT
19+ make validate api=index type=request branch=main
2020```
2121
2222You will see an output like the following:
@@ -82,7 +82,7 @@ open it with your favourite editor and perform the fix
8282Finally run the validation again:
8383
8484``` sh
85- make validate api=index type=request stack-version=8.1.0-SNAPSHOT
85+ make validate api=index type=request branch=main
8686```
8787
88- If there are no more errors, open a pr with the fix.
88+ If there are no more errors, open a pull request with the fix.
You can’t perform that action at this time.
0 commit comments