Skip to content

Commit 2bb9604

Browse files
Address PR review feedback on NFS access point OpenAPI spec.
Use real API response samples, correct action enums (SHARE/IN_PROGRESS), add access-point-specific 400 responses, and add cURL code samples for all four access point operations. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent dec7f26 commit 2bb9604

17 files changed

Lines changed: 175 additions & 82 deletions
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
lang: cURL
2+
source: |-
3+
curl -X POST \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
-d '{"name": "other-vpc", "path": "/other-vpc", "vpc_id": "3f34cdb2-1e4f-4100-b5c7-f55f2762085f", "access_policy": {"anonuid": 65534, "anongid": 65534, "protocols": ["NFS4", "NFS"], "squash_config": "ROOT_SQUASH", "identity_enforcement_enabled": false}}' \
7+
"https://api.digitalocean.com/v2/nfs/shares/baf4827c-6fa9-456f-9dbd-9ddfcacd0720/access_points"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lang: cURL
2+
source: |-
3+
curl -X DELETE \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
"https://api.digitalocean.com/v2/nfs/access_points/7659ce91-354d-4f61-9cda-ae2c7feb61d9"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lang: cURL
2+
source: |-
3+
curl -X GET \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
"https://api.digitalocean.com/v2/nfs/access_points/becd9f04-8afa-4ccd-b03e-9676447df603"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lang: cURL
2+
source: |-
3+
curl -X GET \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
"https://api.digitalocean.com/v2/nfs/shares/baf4827c-6fa9-456f-9dbd-9ddfcacd0720/access_points"

specification/resources/nfs/models/access_point_request.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ properties:
99
characters and match `^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]$`.
1010
The name `default` is reserved (case-insensitive) for the implicit default
1111
access point created with each share.
12-
example: "team-a"
12+
example: "other-vpc"
1313
path:
1414
type: string
1515
description: |
1616
The export sub-path. Must start with `/`, must not be exactly `/` (reserved
1717
for the default access point), must be at most 1024 characters, may contain
1818
only alphanumerics, `-`, `_`, `.`, and `/`, and must not contain `..` path
1919
segments.
20-
example: "/team-a"
20+
example: "/other-vpc"
2121
access_policy:
2222
$ref: "access_policy.yml"
2323
vpc_id:
@@ -26,7 +26,7 @@ properties:
2626
Required. The VPC this access point will be pinned to. A storage gateway is
2727
provisioned (or reused) in this VPC, and the access point becomes mountable from
2828
this VPC regardless of whether the parent share is currently attached to it.
29-
example: "796c6fe3-2a1d-4da2-9f3e-38239827dc91"
29+
example: "3f34cdb2-1e4f-4100-b5c7-f55f2762085f"
3030
required:
3131
- name
3232
- path

specification/resources/nfs/models/access_point_response.yml

Lines changed: 10 additions & 10 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: "team-a"
14+
example: "other-vpc"
1515
share_id:
1616
type: string
1717
format: uuid
@@ -21,7 +21,7 @@ properties:
2121
path:
2222
type: string
2323
description: The export sub-path for this access point (always starts with `/`).
24-
example: "/team-a"
24+
example: "/other-vpc"
2525
status:
2626
type: string
2727
enum: ["ACCESS_POINT_CREATING", "ACCESS_POINT_ACTIVE", "ACCESS_POINT_FAILED", "ACCESS_POINT_DELETED"]
@@ -41,10 +41,11 @@ properties:
4141
example: "2023-01-01T00:00:00Z"
4242
updated_at:
4343
type: string
44-
format: date-time
45-
description: The timestamp when the access point was last updated.
44+
description: |
45+
The timestamp when the access point was last updated. May be empty while the
46+
access point is still being created.
4647
readOnly: true
47-
example: "2023-01-01T01:00:00Z"
48+
example: "2026-06-25T08:11:16Z"
4849
is_default:
4950
type: boolean
5051
description: Whether this is the share's default access point.
@@ -53,11 +54,10 @@ properties:
5354
vpc_id:
5455
type: string
5556
description: |
56-
The VPC this access point is pinned to. Every non-default access point owns its
57-
own storage gateway in this VPC and is independent of the parent share's VPC
58-
lifecycle: it remains mountable from this VPC regardless of whether the share is
59-
currently attached to it.
60-
example: "796c6fe3-2a1d-4da2-9f3e-38239827dc91"
57+
The VPC this access point is pinned to. Omitted on the default access point.
58+
Every non-default access point owns its own storage gateway in this VPC and
59+
is independent of the parent share's VPC lifecycle.
60+
example: "3f34cdb2-1e4f-4100-b5c7-f55f2762085f"
6161
required:
6262
- id
6363
- name

specification/resources/nfs/models/nfs_action.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,39 @@ properties:
55
id:
66
type: string
77
description: The unique identifier of the action.
8-
example: "1"
8+
example: "084c3b9c-2382-441b-92d4-10b095bb5d7c"
99
region_slug:
1010
type: string
1111
description: The DigitalOcean region slug where the resource is located.
12-
example: "atl1"
12+
example: "s2r1"
1313
resource_id:
1414
type: string
1515
format: uuid
1616
description: The unique identifier of the resource on which the action is being performed.
17-
example: "a1b2c3d4-e5f6-4a5b-9c8d-1e2f3a4b5c6d"
17+
example: "7659ce91-354d-4f61-9cda-ae2c7feb61d9"
1818
resource_type:
1919
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"
20+
enum: ["SHARE", "SNAPSHOT"]
21+
description: |
22+
The type of resource on which the action is being performed. Access point
23+
mutations return `SHARE` with `resource_id` set to the access point UUID.
24+
example: "SHARE"
2325
started_at:
2426
type: string
2527
format: date-time
2628
description: The timestamp when the action was started.
27-
example: "2025-10-14T11:55:31.615157397Z"
29+
example: "2026-06-25T08:11:12Z"
2830
status:
2931
type: string
30-
enum: ["in-progress", "completed", "errored"]
32+
enum: ["IN_PROGRESS", "COMPLETED", "ACTION_FAILED"]
3133
description: The current status of the action.
32-
example: "in-progress"
34+
example: "IN_PROGRESS"
3335
type:
3436
type: string
3537
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+
The type of action being performed. Share actions use values such as
39+
`RESIZE_SHARE` and `CREATE_SHARE`. Access point mutations use
40+
`CREATE_ACCESS_POINT` and `DELETE_ACCESS_POINT`.
3841
example: "CREATE_ACCESS_POINT"
3942
required:
4043
- region_slug
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
type: object
3+
description: A standard NFS API error response object.
4+
properties:
5+
code:
6+
type: string
7+
description: A service-defined error code.
8+
example: "MISSING_NAME"
9+
message:
10+
type: string
11+
description: A human-readable description of the error.
12+
example: "name is required"
13+
required:
14+
- code
15+
- message

specification/resources/nfs/nfs_access_point_create.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ parameters:
2323
type: string
2424
format: uuid
2525
description: The unique identifier of the NFS share.
26-
example: "0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d"
26+
example: "baf4827c-6fa9-456f-9dbd-9ddfcacd0720"
2727

2828
requestBody:
2929
required: true
@@ -34,22 +34,22 @@ requestBody:
3434
examples:
3535
Basic Access Point:
3636
value:
37-
name: "team-a"
38-
path: "/team-a"
39-
vpc_id: "796c6fe3-2a1d-4da2-9f3e-38239827dc91"
37+
name: "other-vpc"
38+
path: "/other-vpc"
39+
vpc_id: "3f34cdb2-1e4f-4100-b5c7-f55f2762085f"
4040
access_policy:
4141
anonuid: 65534
4242
anongid: 65534
43-
protocols: ["NFS4"]
43+
protocols: ["NFS4", "NFS"]
4444
squash_config: "ROOT_SQUASH"
45-
identity_enforcement_enabled: true
45+
identity_enforcement_enabled: false
4646

4747
responses:
4848
'201':
4949
$ref: 'responses/access_point_create.yml'
5050

5151
'400':
52-
$ref: 'responses/bad_request.yml'
52+
$ref: 'responses/access_point_bad_request.yml'
5353

5454
'401':
5555
$ref: '../../shared/responses/unauthorized.yml'
@@ -69,6 +69,9 @@ responses:
6969
default:
7070
$ref: '../../shared/responses/unexpected_error.yml'
7171

72+
x-codeSamples:
73+
- $ref: 'examples/curl/nfs_access_point_create.yml'
74+
7275
security:
7376
- bearer_auth:
7477
- "nfs:create"

specification/resources/nfs/nfs_access_point_delete.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ parameters:
2323
type: string
2424
format: uuid
2525
description: The unique identifier of the NFS access point.
26-
example: "a1b2c3d4-e5f6-4a5b-9c8d-1e2f3a4b5c6d"
26+
example: "7659ce91-354d-4f61-9cda-ae2c7feb61d9"
2727

2828
responses:
2929
"200":
3030
$ref: "responses/access_point_delete.yml"
3131

3232
"400":
33-
$ref: "responses/bad_request.yml"
33+
$ref: "responses/access_point_bad_request.yml"
3434

3535
"401":
3636
$ref: "../../shared/responses/unauthorized.yml"
@@ -47,6 +47,9 @@ responses:
4747
default:
4848
$ref: "../../shared/responses/unexpected_error.yml"
4949

50+
x-codeSamples:
51+
- $ref: "examples/curl/nfs_access_point_delete.yml"
52+
5053
security:
5154
- bearer_auth:
5255
- "nfs:delete"

0 commit comments

Comments
 (0)