Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 0 additions & 10 deletions components/schemas/dns/records/RecordIncludes.yml

This file was deleted.

18 changes: 18 additions & 0 deletions platform/paths/dns/records/includes/RecordIncludeParam.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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:
- creators
- containers
- containers:identifiers
- virtual-machines
- virtual-machines:identifiers
22 changes: 22 additions & 0 deletions platform/paths/dns/records/includes/RecordIncludes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
title: RecordIncludes
description: All includable resources linkable to the given records.
type: object
properties:
creators:
$ref: ../../../../../components/schemas/includes/CreatorInclude.yml
containers:
type: object
additionalProperties:
$ref: ../../../../../components/schemas/containers/Container.yml
"containers:identifiers":
type: object
additionalProperties:
$ref: ../../../../../components/schemas/ID.yml
virtual-machines:
type: object
additionalProperties:
$ref: ../../../../../components/schemas/vms/VirtualMachine.yml
virtual-machines:identifiers:
type: object
additionalProperties:
$ref: ../../../../../components/schemas/ID.yml
3 changes: 3 additions & 0 deletions platform/paths/dns/records/record.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ patch:
required: true
schema:
type: string
- $ref: includes/RecordIncludeParam.yml
requestBody:
description: Parameters for updating a DNS Zone Record. The name value cannot be updated and is omitted from the properties.
content:
Expand All @@ -40,6 +41,8 @@ patch:
properties:
data:
$ref: ../../../../components/schemas/dns/records/Record.yml
includes:
$ref: includes/RecordIncludes.yml
default:
$ref: ../../../../components/responses/errors/DefaultError.yml

Expand Down
21 changes: 5 additions & 16 deletions platform/paths/dns/records/records.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,7 @@ 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:
- creators
- containers
- $ref: includes/RecordIncludeParam.yml
- name: filter
in:
query
Expand Down Expand Up @@ -60,7 +46,7 @@ get:
items:
$ref: ../../../../components/schemas/dns/records/Record.yml
includes:
$ref: ../../../../components/schemas/dns/records/RecordIncludes.yml
$ref: includes/RecordIncludes.yml
default:
$ref: ../../../../components/responses/errors/DefaultError.yml

Expand All @@ -77,6 +63,7 @@ post:
required: true
schema:
type: string
- $ref: includes/RecordIncludeParam.yml
requestBody:
description: Parameters for creating a new DNS Zone Record.
content:
Expand Down Expand Up @@ -105,5 +92,7 @@ post:
properties:
data:
$ref: ../../../../components/schemas/dns/records/Record.yml
includes:
$ref: includes/RecordIncludes.yml
default:
$ref: ../../../../components/responses/errors/DefaultError.yml