Skip to content

Commit

Permalink
docs: update openapi docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-yarmosh committed Dec 5, 2023
1 parent 82f20a9 commit a7af960
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
8 changes: 8 additions & 0 deletions public/v1/components/examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ components:
"packets": 6
}
}
createMeasurementPingLocationsMeasurementId:
summary: 'ping: previous measurement id'
value:
{
"type": "ping",
"target": "cdn.jsdelivr.net",
"locations": "1wzMrzLBZfaPoT1c"
}
createMeasurementResponse:
value:
{
Expand Down
14 changes: 8 additions & 6 deletions public/v1/components/schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,14 @@ components:
maximum: 200
default: 1
MeasurementLocations:
type: array
description: |
An array of locations from which to run the measurement.
Each object specifies a location using one or multiple keys.
items:
$ref: 'schemas.yaml#/components/schemas/MeasurementLocationOption'
oneOf:
- type: array
description: |
An array of locations from which to run the measurement. Each object specifies a location using one or multiple keys.
items:
$ref: 'schemas.yaml#/components/schemas/MeasurementLocationOption'
- type: string
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.
MeasurementOptions:
anyOf:
- $ref: 'schemas.yaml#/components/schemas/MeasurementPingOptions'
Expand Down
3 changes: 3 additions & 0 deletions public/v1/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ paths:
- Set the `inProgressUpdates` option to `true` if the application is running in interactive mode so that the user sees the results right away.
- 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.
- To use the same probes in different measurements pass id of the first measurement to the `locations` option.
requestBody:
content:
application/json:
Expand All @@ -61,6 +62,8 @@ paths:
$ref: 'components/examples.yaml#/components/examples/createMeasurementPingLocationsMagic'
pingCustom:
$ref: 'components/examples.yaml#/components/examples/createMeasurementPingCustom'
pingLocationsMeasurementId:
$ref: 'components/examples.yaml#/components/examples/createMeasurementPingLocationsMeasurementId'
responses:
'202':
$ref: 'components/responses.yaml#/components/responses/measurements202'
Expand Down

0 comments on commit a7af960

Please sign in to comment.