diff --git a/components/schemas/includes/ServerModelsIncludes.yml b/components/schemas/includes/ServerModelsIncludes.yml new file mode 100644 index 00000000..cb4ae9c7 --- /dev/null +++ b/components/schemas/includes/ServerModelsIncludes.yml @@ -0,0 +1,5 @@ +title: ServerModelsIncludes +description: A resource associated with a server models. +type: object +additionalProperties: + $ref: ../infrastructure/providers/ProviderServer.yml diff --git a/components/schemas/infrastructure/auto-scale/groups/AutoScaleGroupIncludes.yml b/components/schemas/infrastructure/auto-scale/groups/AutoScaleGroupIncludes.yml new file mode 100644 index 00000000..cb27857f --- /dev/null +++ b/components/schemas/infrastructure/auto-scale/groups/AutoScaleGroupIncludes.yml @@ -0,0 +1,10 @@ +title: AutoScaleGroupIncludes +description: All includable resource linkable to the given auto-scale group. +type: object +properties: + providers: + "$ref": "../../../includes/ProvidersIncludes.yml" + models: + "$ref": "../../../includes/ServerModelsIncludes.yml" + locations: + "$ref": "../../../includes/LocationsIncludes.yml" diff --git a/components/schemas/infrastructure/auto-scale/groups/AutoScaleGroupInfrastructure.yml b/components/schemas/infrastructure/auto-scale/groups/AutoScaleGroupInfrastructure.yml index df20b923..836bb582 100644 --- a/components/schemas/infrastructure/auto-scale/groups/AutoScaleGroupInfrastructure.yml +++ b/components/schemas/infrastructure/auto-scale/groups/AutoScaleGroupInfrastructure.yml @@ -9,13 +9,13 @@ properties: type: object required: - provider - - id + - model_id - priority - locations properties: provider: type: string - id: + model_id: type: string priority: type: integer diff --git a/components/schemas/infrastructure/providers/LocationProvider.yml b/components/schemas/infrastructure/providers/LocationProvider.yml index 973bfe70..8ab7de41 100644 --- a/components/schemas/infrastructure/providers/LocationProvider.yml +++ b/components/schemas/infrastructure/providers/LocationProvider.yml @@ -16,3 +16,7 @@ properties: code: type: string description: A location code returned from the provider. + availability_zones: + type: array + items: + type: string diff --git a/public/paths/infrastructure/auto-scale/groups/group.yml b/public/paths/infrastructure/auto-scale/groups/group.yml index 45d27840..67dc9aa4 100644 --- a/public/paths/infrastructure/auto-scale/groups/group.yml +++ b/public/paths/infrastructure/auto-scale/groups/group.yml @@ -9,6 +9,22 @@ get: required: true schema: type: string + - name: include + in: query + required: false + description: + A comma separated list of include values. Included resources will show + up under the root document's `include` field, with the key being the id of the included + resource. In the case of applying an include to a collection of resources, if two + resources share the same include, it will only appear once in the return. + schema: + type: array + items: + type: string + enum: + - providers + - models + - locations summary: Fetch Auto-Scale Group description: Requires the `autoscale-groups-view` capability. responses: @@ -22,6 +38,8 @@ get: properties: data: $ref: ../../../../../components/schemas/infrastructure/auto-scale/groups/AutoScaleGroup.yml + includes: + $ref: ../../../../../components/schemas/infrastructure/auto-scale/groups/AutoScaleGroupIncludes.yml default: $ref: ../../../../../components/responses/errors/DefaultError.yml patch: diff --git a/public/paths/infrastructure/auto-scale/groups/groups.yml b/public/paths/infrastructure/auto-scale/groups/groups.yml index 19bbf991..d957aaff 100644 --- a/public/paths/infrastructure/auto-scale/groups/groups.yml +++ b/public/paths/infrastructure/auto-scale/groups/groups.yml @@ -4,6 +4,22 @@ get: - InfrastructureAutoScaleGroup parameters: - $ref: ../../../../../components/parameters/PageParam.yml + - name: include + in: query + required: false + description: + A comma separated list of include values. Included resources will show + up under the root document's `include` field, with the key being the id of the included + resource. In the case of applying an include to a collection of resources, if two + resources share the same include, it will only appear once in the return. + schema: + type: array + items: + type: string + enum: + - providers + - models + - locations summary: Get Auto-Scale Groups list description: Requires the `autoscale-groups-manage` capability. responses: @@ -19,6 +35,8 @@ get: type: array items: $ref: ../../../../../components/schemas/infrastructure/auto-scale/groups/AutoScaleGroup.yml + includes: + $ref: ../../../../../components/schemas/infrastructure/auto-scale/groups/AutoScaleGroupIncludes.yml default: $ref: ../../../../../components/responses/errors/DefaultError.yml post: diff --git a/public/paths/sdn/networks.yml b/public/paths/sdn/networks.yml index 758b99da..087f5434 100644 --- a/public/paths/sdn/networks.yml +++ b/public/paths/sdn/networks.yml @@ -18,7 +18,6 @@ get: enum: - creators - environments - - name: filter in: query # Deep nested arrays are undefined https://github.com/OAI/OpenAPI-Specification/issues/1706