Skip to content

Commit

Permalink
docs/openapi: update OpenAPI references
Browse files Browse the repository at this point in the history
These changes are generated by the openapi generator through a make
command.

Signed-off-by: Gabor Javorszky <[email protected]>
Signed-off-by: Ava Hahn <[email protected]>
  • Loading branch information
avahahn authored and javorszky committed Nov 12, 2024
1 parent eb9b0ff commit c3f14ca
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 0 deletions.
90 changes: 90 additions & 0 deletions docs/unit-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3090,6 +3090,68 @@ paths:
"404":
$ref: "#/components/responses/responseNotFound"

/config/settings/telemetry:
summary: "Endpoint for the `telemetry` object in `settings`"
get:
operationId: getSettingsTelemetry
summary: "Retrieve the `telemetry` object from settings"
description: "Retrieves the `telemetry` object that represents Unit's
[Telemetry settings](https://unit.nginx.org/configuration/#settings)."
tags:
- settings
- config
responses:
"200":
description: "Ok; the `telemetry` object exists in the configuration."
content:
application/json:
schema:
$ref: "#/components/schemas/configSettingsTelemetry"
"404":
$ref: "#/components/responses/responseNotFound"

put:
operationId: putSettingsTelemetry
summary: "Create or update the `telemetry` object in settings"
description: "Creates or updates the `telemetry` object that represents Unit's
[Telemetry settings](https://unit.nginx.org/configuration/#settings)."
tags:
- settings
- config
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/configSettingsTelemetry"
responses:
"200":
$ref: "#/components/responses/responseOkUpdated"

"400":
$ref: "#/components/responses/responseBadRequest"

"404":
$ref: "#/components/responses/responseNotFound"

"500":
$ref: "#/components/responses/responseInternalError"

delete:
operationId: deleteSettingsTelemetry
summary: "Delete the telemetry object"
description: "Deletes the `telemetry` object from the configuration."
tags:
- settings
- config

responses:
"200":
$ref: "#/components/responses/responseOkDeleted"

"404":
$ref: "#/components/responses/responseNotFound"

/config/settings/http:
summary: "Endpoint for the `http` object in `settings`"

Expand Down Expand Up @@ -6545,10 +6607,38 @@ components:
Unit settings."

properties:
telemetry:
description: "Represents global telemetry settings in Unit."
$ref: "#/components/schemas/configSettingsTelemetry"

http:
description: "Represents global HTTP settings in Unit."
$ref: "#/components/schemas/configSettingsHttp"

# /config/settings/telemetry
configSettingsTelemetry:
type: object
description: "An object whose options represent global telemetry settings in Unit."
required: ["endpoint"]
properties:
batch_size:
type: integer
description: "Number of spans to cache before sending to telemetry collector."
default: 128

endpoint:
type: string
description: "A valid endpoint to which Unit can send OpenTelemetry spans."

protocol:
type: string
description: "Protocol to use when communicating with the aforementioned endpoint."

sampling_ratio:
type: number
default: 1
description: "A number in between 0 and 1 that describes the percent of requests traced"

# /config/settings/http
configSettingsHttp:
type: object
Expand Down
Loading

0 comments on commit c3f14ca

Please sign in to comment.