Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 78 additions & 17 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12191,12 +12191,13 @@ components:
type: string
type: array
autoscaling:
additionalProperties:
type: string
description: 'Autoscaling configuration as key-value pairs. Example: {"metric":
"QueueBacklogPerWorker", "target": "10"} to scale based on queue
backlog'
type: object
description: 'Autoscaling configuration. Example: {"metric": "QueueBacklogPerWorker",
"target": 1.01} to scale based on queue backlog. Omit or set to null to
disable autoscaling'
oneOf:
- $ref: '#/components/schemas/HTTPAutoscalingConfig'
- $ref: '#/components/schemas/QueueAutoscalingConfig'
- $ref: '#/components/schemas/CustomMetricAutoscalingConfig'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Autoscaling oneOf missing null type despite description

Medium Severity

The autoscaling field descriptions in CreateDeploymentRequest and UpdateDeploymentRequest say "set to null to disable autoscaling," but the oneOf doesn't include a null type option. In OpenAPI 3.1.0, null needs to be explicitly allowed (e.g., - type: 'null' in the oneOf list). Without it, sending null for autoscaling will fail validation, contradicting the documented behavior.

Additional Locations (1)

Fix in Cursor Fix in Web

command:
description: Command overrides the container's ENTRYPOINT. Provide as an array
(e.g., ["/bin/sh", "-c"])
Expand Down Expand Up @@ -12351,11 +12352,12 @@ components:
type: string
type: array
autoscaling:
additionalProperties:
type: string
description: Autoscaling contains autoscaling configuration parameters for this
deployment
type: object
description: Autoscaling contains autoscaling configuration parameters for
this deployment. Omitted when autoscaling is disabled (nil)
oneOf:
- $ref: '#/components/schemas/HTTPAutoscalingConfig'
- $ref: '#/components/schemas/QueueAutoscalingConfig'
- $ref: '#/components/schemas/CustomMetricAutoscalingConfig'
command:
description: Command is the entrypoint command run in the container
items:
Expand Down Expand Up @@ -12490,6 +12492,65 @@ components:
required:
- name
type: object
HTTPAutoscalingConfig:
description: Autoscaling config for HTTPTotalRequests and HTTPAvgRequestDuration
metrics
properties:
metric:
description: Metric must be HTTPTotalRequests or HTTPAvgRequestDuration
enum:
- HTTPTotalRequests
- HTTPAvgRequestDuration
example: HTTPTotalRequests
type: string
target:
description: 'Target is the threshold value. Default: 100 for HTTPTotalRequests,
500 (ms) for HTTPAvgRequestDuration'
example: 100
type: number
time_interval_minutes:
description: 'TimeIntervalMinutes is the rate window in minutes. Default:
10'
example: 10
type: integer
type: object
QueueAutoscalingConfig:
description: Autoscaling config for QueueBacklogPerWorker metric
properties:
metric:
description: Metric must be QueueBacklogPerWorker
enum:
- QueueBacklogPerWorker
example: QueueBacklogPerWorker
type: string
model:
description: Model overrides the model name for queue status lookup. Defaults
to the deployment app name
type: string
target:
description: 'Target is the threshold value. Default: 1.01'
example: 1.01
type: number
type: object
CustomMetricAutoscalingConfig:
description: Autoscaling config for CustomMetric metric
properties:
custom_metric_name:
description: CustomMetricName is the Prometheus metric name. Required. Must
match [a-zA-Z_:][a-zA-Z0-9_:]*
example: my_custom_metric
type: string
metric:
description: Metric must be CustomMetric
enum:
- CustomMetric
example: CustomMetric
type: string
target:
description: 'Target is the threshold value. Default: 500'
example: 500
type: number
type: object
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing required metric field breaks oneOf validation

High Severity

None of the three new schemas (HTTPAutoscalingConfig, QueueAutoscalingConfig, CustomMetricAutoscalingConfig) mark metric as required, and the oneOf lacks a discriminator. Without required: [metric], a payload like {"target": 100} matches all three schemas, violating the oneOf constraint (exactly one must match) and causing validation to reject valid requests. The existing InterpreterOutput schema in this file demonstrates the correct pattern: using discriminator: propertyName plus required on each sub-schema.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

custom_metric_name described as required but not enforced

Medium Severity

The custom_metric_name property in CustomMetricAutoscalingConfig has a description that explicitly states "Required," but the schema has no required list enforcing it. A client can submit a CustomMetric autoscaling config without custom_metric_name and pass validation, even though the backend presumably needs a Prometheus metric name to function. This mismatch between documented and enforced constraints will lead to confusing server-side errors.

Fix in Cursor Fix in Web

KubernetesEvent:
properties:
action:
Expand Down Expand Up @@ -12608,12 +12669,12 @@ components:
type: string
type: array
autoscaling:
additionalProperties:
type: string
description: 'Autoscaling configuration as key-value pairs. Example: {"metric":
"QueueBacklogPerWorker", "target": "10"} to scale based on queue
backlog'
type: object
description: Autoscaling configuration for the deployment. Omit or set to
null to disable autoscaling
oneOf:
- $ref: '#/components/schemas/HTTPAutoscalingConfig'
- $ref: '#/components/schemas/QueueAutoscalingConfig'
- $ref: '#/components/schemas/CustomMetricAutoscalingConfig'
command:
description: Command overrides the container's ENTRYPOINT. Provide as an array
(e.g., ["/bin/sh", "-c"])
Expand Down