Skip to content

Commit

Permalink
Merge pull request #2805 from cloudfoundry/openapi_licence_and_spec-pkg
Browse files Browse the repository at this point in the history
OpenAPI-licence and spec-pkg
  • Loading branch information
joergdw authored Mar 26, 2024
2 parents bcece9f + 95ffaca commit 9e3dc91
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 5 deletions.
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
9 changes: 9 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@
};
});

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

devShells = forAllSystems (system:
let
pkgs = nixpkgsFor.${system};
Expand Down
1 change: 1 addition & 0 deletions result

0 comments on commit 9e3dc91

Please sign in to comment.