Skip to content

Commit b29592d

Browse files
committed
Fix request body for UpdateDrive
The UpdateDrive request does not require the 'name' property. It is only required for creating a drive. We fixed this by introducing a new type 'driveUpdate' with 'name' as an optional property and deriving the 'drive' type from it with 'name' as a required property. This is needed because the latest release of the code generator for go now does some basic validation for required attributes.
1 parent 33a9f7b commit b29592d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

api/openapi-spec/v1.0.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ paths:
306306
content:
307307
application/json:
308308
schema:
309-
$ref: '#/components/schemas/drive'
309+
$ref: '#/components/schemas/driveUpdate'
310310
examples:
311311
change quota:
312312
value:
@@ -4035,9 +4035,13 @@ components:
40354035
description: 'The user`s type. This can be either "Member" for regular user, or "Guest" for guest users.'
40364036
drive:
40374037
description: The drive represents a space on the storage.
4038-
type: object
40394038
required:
40404039
- name
4040+
allOf:
4041+
- $ref: '#/components/schemas/driveUpdate'
4042+
driveUpdate:
4043+
description: The drive represents an update to a space on the storage.
4044+
type: object
40414045
properties:
40424046
# entity
40434047
id:

0 commit comments

Comments
 (0)