Skip to content

Commit 2bd1351

Browse files
docs: update openapi docs
1 parent 5235ab1 commit 2bd1351

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

Diff for: public/v1/components/examples.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ components:
7575
"packets": 6
7676
}
7777
}
78+
createMeasurementPingLocationsMeasurementId:
79+
summary: 'ping: previous measurement id'
80+
value:
81+
{
82+
"type": "ping",
83+
"target": "cdn.jsdelivr.net",
84+
"locations": "1wzMrzLBZfaPoT1c"
85+
}
7886
createMeasurementResponse:
7987
value:
8088
{

Diff for: public/v1/components/schemas.yaml

+8-6
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,14 @@ components:
7676
maximum: 200
7777
default: 1
7878
MeasurementLocations:
79-
type: array
80-
description: |
81-
An array of locations from which to run the measurement.
82-
Each object specifies a location using one or multiple keys.
83-
items:
84-
$ref: 'schemas.yaml#/components/schemas/MeasurementLocationOption'
79+
oneOf:
80+
- type: array
81+
description: |
82+
An array of locations from which to run the measurement. Each object specifies a location using one or multiple keys.
83+
items:
84+
$ref: 'schemas.yaml#/components/schemas/MeasurementLocationOption'
85+
- type: string
86+
description: Id of a previous measurement. Probes of that measurement in the same order are used to create a new measurement. Only probes are copied, measurement type and options may be any and should still be specified in request.
8587
MeasurementOptions:
8688
anyOf:
8789
- $ref: 'schemas.yaml#/components/schemas/MeasurementPingOptions'

Diff for: public/v1/spec.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ paths:
4747
4848
- Set the `inProgressUpdates` option to `true` if the application is running in interactive mode so that the user sees the results right away.
4949
- If the application is interactive by default but also implements a "CI" mode to be used in scripts, do not set the flag in the CI mode.
50+
- To use the same probes in different measurements pass id of the first measurement to the `locations` option.
5051
requestBody:
5152
content:
5253
application/json:
@@ -61,6 +62,8 @@ paths:
6162
$ref: 'components/examples.yaml#/components/examples/createMeasurementPingLocationsMagic'
6263
pingCustom:
6364
$ref: 'components/examples.yaml#/components/examples/createMeasurementPingCustom'
65+
pingLocationsMeasurementId:
66+
$ref: 'components/examples.yaml#/components/examples/createMeasurementPingLocationsMeasurementId'
6467
responses:
6568
'202':
6669
$ref: 'components/responses.yaml#/components/responses/measurements202'

0 commit comments

Comments
 (0)