Skip to content

Commit 8ea7456

Browse files
Address review feedback on NFS access point OpenAPI spec.
Align models and examples with sharesvc behavior: fix delete action status, document validation constraints, add access_points to share responses, dedupe the action schema, and wire get/list responses to shared model files. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent cf9c10d commit 8ea7456

16 files changed

Lines changed: 113 additions & 141 deletions

specification/resources/nfs/models/access_point_action_response.yml

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -5,49 +5,7 @@ properties:
55
access_point:
66
$ref: "access_point_response.yml"
77
action:
8-
type: object
9-
description: The action that was submitted for the access point mutation.
10-
properties:
11-
id:
12-
type: string
13-
description: The unique identifier of the action.
14-
example: "1"
15-
region_slug:
16-
type: string
17-
description: The DigitalOcean region slug where the resource is located.
18-
example: "atl1"
19-
resource_id:
20-
type: string
21-
format: uuid
22-
description: The unique identifier of the resource on which the action is being performed.
23-
example: "a1b2c3d4-e5f6-4a5b-9c8d-1e2f3a4b5c6d"
24-
resource_type:
25-
type: string
26-
enum: ["network_file_share"]
27-
description: The type of resource on which the action is being performed.
28-
example: "network_file_share"
29-
started_at:
30-
type: string
31-
format: date-time
32-
description: The timestamp when the action was started.
33-
example: "2025-10-14T11:55:31.615157397Z"
34-
status:
35-
type: string
36-
enum: ["in-progress", "completed", "errored"]
37-
description: The current status of the action.
38-
example: "in-progress"
39-
type:
40-
type: string
41-
description: The type of action being performed. Access point mutations use CREATE_ACCESS_POINT and DELETE_ACCESS_POINT.
42-
example: "CREATE_ACCESS_POINT"
43-
required:
44-
- region_slug
45-
- resource_id
46-
- resource_type
47-
- started_at
48-
- status
49-
- type
8+
$ref: "nfs_action.yml"
509
required:
5110
- access_point
5211
- action
53-
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
type: object
3+
description: Response containing a single access point.
4+
properties:
5+
access_point:
6+
$ref: "access_point_response.yml"
7+
required:
8+
- access_point

specification/resources/nfs/models/access_point_list_response.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,5 @@ properties:
77
items:
88
$ref: "access_point_response.yml"
99
description: Array of access point objects.
10-
example:
11-
- id: "a1b2c3d4-e5f6-4a5b-9c8d-1e2f3a4b5c6d"
12-
name: "my-access-point"
13-
share_id: "0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d"
14-
path: "/exports/data"
15-
status: "ACCESS_POINT_ACTIVE"
16-
is_default: false
17-
created_at: "2023-01-01T00:00:00Z"
18-
updated_at: "2023-01-01T01:00:00Z"
1910
required:
2011
- access_points
21-

specification/resources/nfs/models/access_point_request.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,20 @@ description: Payload for creating a new access point on a share.
44
properties:
55
name:
66
type: string
7-
description: The name for the access point. Must be unique per share.
8-
example: "my-access-point"
7+
description: |
8+
The name for the access point. Must be unique per share. Must be 2–63
9+
characters and match `^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]$`.
10+
The name `default` is reserved (case-insensitive) for the implicit default
11+
access point created with each share.
12+
example: "team-a"
913
path:
1014
type: string
11-
description: The export sub-path. Must start with "/" and cannot be "/".
12-
example: "/exports/data"
15+
description: |
16+
The export sub-path. Must start with `/`, must not be exactly `/` (reserved
17+
for the default access point), must be at most 1024 characters, may contain
18+
only alphanumerics, `-`, `_`, `.`, and `/`, and must not contain `..` path
19+
segments.
20+
example: "/team-a"
1321
access_policy:
1422
$ref: "access_policy.yml"
1523
vpc_id:
@@ -24,4 +32,3 @@ required:
2432
- name
2533
- path
2634
- access_policy
27-

specification/resources/nfs/models/access_point_response.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ properties:
1111
name:
1212
type: string
1313
description: The human-readable name of the access point. Must be unique per share.
14-
example: "my-access-point"
14+
example: "team-a"
1515
share_id:
1616
type: string
1717
format: uuid
@@ -20,8 +20,8 @@ properties:
2020
example: "0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d"
2121
path:
2222
type: string
23-
description: The export sub-path for this access point. Must start with "/" and cannot be "/".
24-
example: "/exports/data"
23+
description: The export sub-path for this access point (always starts with `/`).
24+
example: "/team-a"
2525
status:
2626
type: string
2727
enum: ["ACCESS_POINT_CREATING", "ACCESS_POINT_ACTIVE", "ACCESS_POINT_FAILED", "ACCESS_POINT_DELETED"]
@@ -68,4 +68,3 @@ required:
6868
- created_at
6969
- updated_at
7070
- is_default
71-

specification/resources/nfs/models/access_policy.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
type: object
3-
description: Provider-agnostic NFS access policy for an access point.
3+
description: |
4+
Provider-agnostic NFS access policy for an access point. Network CIDRs are
5+
managed by attach, detach, and managed-access workflows and are not part of
6+
this policy.
47
properties:
58
anonuid:
69
type: integer
@@ -14,9 +17,9 @@ properties:
1417
type: array
1518
items:
1619
type: string
17-
enum: ["NFS", "NFS4"]
20+
enum: ["NFS4", "NFS"]
1821
description: Allowed NFS protocols for this export.
19-
example: ["NFS4"]
22+
example: ["NFS4", "NFS"]
2023
squash_config:
2124
type: string
2225
enum: ["NO_SQUASH", "ROOT_SQUASH", "ALL_SQUASH"]
@@ -25,11 +28,10 @@ properties:
2528
identity_enforcement_enabled:
2629
type: boolean
2730
description: Whether identity enforcement is enabled for this export.
28-
example: true
31+
example: false
2932
required:
3033
- anonuid
3134
- anongid
3235
- protocols
3336
- squash_config
3437
- identity_enforcement_enabled
35-
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
type: object
3+
description: The action that was submitted.
4+
properties:
5+
id:
6+
type: string
7+
description: The unique identifier of the action.
8+
example: "1"
9+
region_slug:
10+
type: string
11+
description: The DigitalOcean region slug where the resource is located.
12+
example: "atl1"
13+
resource_id:
14+
type: string
15+
format: uuid
16+
description: The unique identifier of the resource on which the action is being performed.
17+
example: "a1b2c3d4-e5f6-4a5b-9c8d-1e2f3a4b5c6d"
18+
resource_type:
19+
type: string
20+
enum: ["network_file_share", "network_file_share_snapshot"]
21+
description: The type of resource on which the action is being performed.
22+
example: "network_file_share"
23+
started_at:
24+
type: string
25+
format: date-time
26+
description: The timestamp when the action was started.
27+
example: "2025-10-14T11:55:31.615157397Z"
28+
status:
29+
type: string
30+
enum: ["in-progress", "completed", "errored"]
31+
description: The current status of the action.
32+
example: "in-progress"
33+
type:
34+
type: string
35+
description: |
36+
The type of action being performed. Share actions use values such as resize
37+
and snapshot. Access point mutations use CREATE_ACCESS_POINT and DELETE_ACCESS_POINT.
38+
example: "CREATE_ACCESS_POINT"
39+
required:
40+
- region_slug
41+
- resource_id
42+
- resource_type
43+
- started_at
44+
- status
45+
- type

specification/resources/nfs/models/nfs_actions_response.yml

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,6 @@ description: Action response of an NFS share.
33

44
properties:
55
action:
6-
type: object
7-
description: The action that was submitted.
8-
properties:
9-
region_slug:
10-
type: string
11-
description: The DigitalOcean region slug where the resource is located.
12-
example: "atl1"
13-
resource_id:
14-
type: string
15-
format: uuid
16-
description: The unique identifier of the resource on which the action is being performed.
17-
example: "b5eb9e60-6750-4f3f-90b6-8296966eaf35"
18-
resource_type:
19-
type: string
20-
enum: ["network_file_share", "network_file_share_snapshot"]
21-
description: The type of resource on which the action is being performed.
22-
example: "network_file_share"
23-
started_at:
24-
type: string
25-
format: date-time
26-
description: The timestamp when the action was started.
27-
example: "2025-10-14T11:55:31.615157397Z"
28-
status:
29-
type: string
30-
enum: ["in-progress", "completed", "errored"]
31-
description: The current status of the action.
32-
example: "in-progress"
33-
type:
34-
type: string
35-
description: The type of action being performed.
36-
example: "resize"
37-
required:
38-
- region_slug
39-
- resource_id
40-
- resource_type
41-
- started_at
42-
- status
43-
- type
6+
$ref: "nfs_action.yml"
447
required:
458
- action

specification/resources/nfs/models/nfs_response.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ properties:
4444
type: string
4545
description: The host IP of the NFS server that will be accessible from the associated VPC
4646
example: "10.128.32.2"
47+
access_points:
48+
type: array
49+
items:
50+
$ref: 'access_point_response.yml'
51+
description: Access points configured on this share. The default access point is returned first.
4752
required:
4853
- id
4954
- name

specification/resources/nfs/nfs_access_point_create.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ description: |
88
99
A successful request will return the newly created access point and an action object.
1010
11+
The parent share must be in `ACTIVE` or `INACTIVE` status. Validation failures and
12+
precondition errors (such as an ineligible share state) return `400 Bad Request`.
13+
Duplicate name or path conflicts return `409 Conflict`.
14+
1115
tags:
1216
- NFS
1317

@@ -30,8 +34,8 @@ requestBody:
3034
examples:
3135
Basic Access Point:
3236
value:
33-
name: "my-access-point"
34-
path: "/exports/data"
37+
name: "team-a"
38+
path: "/team-a"
3539
access_policy:
3640
anonuid: 65534
3741
anongid: 65534
@@ -52,6 +56,9 @@ responses:
5256
'404':
5357
$ref: '../../shared/responses/not_found.yml'
5458

59+
'409':
60+
$ref: '../../shared/responses/conflict.yml'
61+
5562
'429':
5663
$ref: '../../shared/responses/too_many_requests.yml'
5764

@@ -64,4 +71,3 @@ responses:
6471
security:
6572
- bearer_auth:
6673
- "nfs:create"
67-

0 commit comments

Comments
 (0)