Skip to content

Commit

Permalink
document openapi spec about binding configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
asalan316 committed Nov 26, 2024
1 parent a33ae80 commit 63c2409
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
4 changes: 2 additions & 2 deletions api/application-metric-api.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.0
info:
title: Application Metric API
description: |
List aggregated metrics of an application. AutoScaler collects the instances' metrics of an
List aggregated metrics of an application. AutoScaler collects the instances metrics of an
application, and aggregate the raw data into an accumulated value for evaluation.
This API is used to return the aggregated metric result of an application.
Expand All @@ -22,7 +22,7 @@ paths:
in: path
required: true
description: |
The GUID identifying the application for which the scaling history is fetched.
The GUID identifying the application for which the aggregated metric histories is fetched.
It can be found in the `application_id` property of the JSON object stored in the
`VCAP_APPLICATION` environment variable.
Expand Down
31 changes: 28 additions & 3 deletions api/policy-api.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ paths:
in: path
required: true
description: |
The GUID identifying the application for which the scaling history is fetched.
The GUID identifying the application for which the scaling policy is fetched.
It can be found in the `application_id` property of the JSON object stored in the
`VCAP_APPLICATION` environment variable.
schema:
$ref: "./shared_definitions.yaml#/schemas/GUID"
put:
summary: Retrieves the Policy
summary: Create the Policy
description: This API is used to create the policy
tags:
- Create Policy API V1
Expand Down Expand Up @@ -78,8 +78,16 @@ paths:
components:
schemas:
Policy:
description: Object containing Policy
description: Object containing policy and optional configuration
type: object
required:
- instance_min_count
- instance_max_count
anyOf:
- required:
- scaling_rules
- required:
- schedules
properties:
instance_min_count:
type: integer
Expand All @@ -95,6 +103,23 @@ components:
type: array
items:
$ref: '#/components/schemas/ScalingRule'
configuration:
type: object
properties:
custom_metrics:
type: object
properties:
metric_submission_strategy:
type: object
properties:
allow_from:
type: string
enum:
- bound_app
required:
- allow_from
required:
- metric_submission_strategy
ScalingRule:
type: object
required:
Expand Down

0 comments on commit 63c2409

Please sign in to comment.