diff --git a/api/application-metric-api.openapi.yaml b/api/application-metric-api.openapi.yaml index 14d1e395fa..cdcdd95f86 100644 --- a/api/application-metric-api.openapi.yaml +++ b/api/application-metric-api.openapi.yaml @@ -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. @@ -118,7 +122,7 @@ components: format: uri resources: type: array - items: + items: $ref: '#/components/schemas/ApplicationMetric' ApplicationMetric: description: Object containing metric history @@ -154,4 +158,4 @@ components: bearerAuth: type: http scheme: bearer - bearerFormat: JWT \ No newline at end of file + bearerFormat: JWT diff --git a/api/custom-metrics-api.openapi.yaml b/api/custom-metrics-api.openapi.yaml index 4eedf5b11a..d57687f778 100644 --- a/api/custom-metrics-api.openapi.yaml +++ b/api/custom-metrics-api.openapi.yaml @@ -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. @@ -89,4 +93,4 @@ components: description: Use the Instance Identity Credentials provided by the Cloud Foundry runtime basicAuthentication: type: http - scheme: basic \ No newline at end of file + scheme: basic diff --git a/api/policy-api.openapi.yaml b/api/policy-api.openapi.yaml index 52ad543d5c..6860cfd263 100644 --- a/api/policy-api.openapi.yaml +++ b/api/policy-api.openapi.yaml @@ -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: @@ -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 @@ -243,4 +247,4 @@ components: bearerAuth: type: http scheme: bearer - bearerFormat: JWT \ No newline at end of file + bearerFormat: JWT diff --git a/api/scaling-history-api.openapi.yaml b/api/scaling-history-api.openapi.yaml index a7250e6e37..4237eedcd7 100644 --- a/api/scaling-history-api.openapi.yaml +++ b/api/scaling-history-api.openapi.yaml @@ -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 diff --git a/flake.nix b/flake.nix index 9125fef282..0df04e92a2 100644 --- a/flake.nix +++ b/flake.nix @@ -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}; diff --git a/result b/result new file mode 120000 index 0000000000..b0833e7111 --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/jh9qqg0h60906vbhz08h238hhsd0m632-api \ No newline at end of file