Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAPI-licence and spec-pkg #2805

Merged
merged 3 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
8 changes: 6 additions & 2 deletions api/application-metric-api.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ info:

This API is used to return the aggregated metric result of an application.
version: 1.0.0
license:
name: "Apache License Version 2.0"
# identifier: "Apache-2.0" # Requires at least OpenAPI 3.1.0
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
tags:
- name: Application Metric API V1
description: List aggregated metrics of an application.
Expand Down Expand Up @@ -118,7 +122,7 @@ components:
format: uri
resources:
type: array
items:
items:
$ref: '#/components/schemas/ApplicationMetric'
ApplicationMetric:
description: Object containing metric history
Expand Down Expand Up @@ -154,4 +158,4 @@ components:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
bearerFormat: JWT
6 changes: 5 additions & 1 deletion api/custom-metrics-api.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ info:
description: |
app-autoscaler lets you automatically increase or decrease the number of your application instances based on the policies you have defined. Your applications can call the app-autoscaler custom metrics API to submit custom metrics defined and used in a dynamic scaling policy to enable automatic scaling based on application-specific metrics.
version: 1.0.0
license:
name: "Apache License Version 2.0"
# identifier: "Apache-2.0" # Requires at least OpenAPI 3.1.0
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
tags:
- name: Custom Metrics API V1
description: Work with application-specific custom metrics to scale your application.
Expand Down Expand Up @@ -89,4 +93,4 @@ components:
description: Use the Instance Identity Credentials provided by the Cloud Foundry runtime
basicAuthentication:
type: http
scheme: basic
scheme: basic
8 changes: 6 additions & 2 deletions api/policy-api.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ info:
title: Policy API
description: This API is used to create, delete, retrieve the policy
version: 1.0.0
license:
name: "Apache License Version 2.0"
# identifier: "Apache-2.0" # Requires at least OpenAPI 3.1.0
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
security:
- bearerAuth: []
tags:
Expand Down Expand Up @@ -213,7 +217,7 @@ components:
- end_date_time
- instance_min_count
- instance_max_count
properties:
properties:
start_date_time:
description: the start time of the schedule. Must be a future time
type: string
Expand Down Expand Up @@ -243,4 +247,4 @@ components:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
bearerFormat: JWT
4 changes: 4 additions & 0 deletions api/scaling-history-api.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ info:
title: Scaling History API
description: List scaling history of an application
version: 1.0.0
license:
name: "Apache License Version 2.0"
# identifier: "Apache-2.0" # Requires at least OpenAPI 3.1.0
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
tags:
- name: Scaling History API V1
description: List the scaling history of an Application
Expand Down
6 changes: 6 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@
};
});

openapi-specifications = {
app-autoscaler-api = builtins.filterSource
(path: type: builtins.match ".*\.ya?ml" (baseNameOf path) != null && type == "regular")
"${app-autoscaler-release}/api";
};

devShells = forAllSystems (system:
let
pkgs = nixpkgsFor.${system};
Expand Down
Loading