Skip to content

Commit

Permalink
docs: add bucket name refs
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjan committed Dec 12, 2024
1 parent a350551 commit a474dc8
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 27 deletions.
7 changes: 6 additions & 1 deletion .changeset/add_bus_routes_to_openapi_spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@
default: major
---

# Add bus routes to openapi spec
# Add bus section to openapi spec

Added routes:
- accounts
- alerts
- buckets
58 changes: 32 additions & 26 deletions openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,12 @@ paths:
example: "myDir/myFile"
minLength: 1
- name: bucket
description: The bucket the multipart upload belongs to
description: The name of the bucket the multipart upload belongs to
example: "myBucket"
in: query
required: true
schema:
$ref: "#/components/schemas/Bucket"
$ref: "#/components/schemas/BucketName"
- name: uploadid
description: The ID of the ongoing multipart upload
in: query
Expand Down Expand Up @@ -364,12 +364,12 @@ paths:
example: "myDir/myFile"
minLength: 1
- name: bucket
description: The bucket the object belongs to
description: The name of the bucket the object belongs to
example: "myBucket"
in: query
required: true
schema:
$ref: "#/components/schemas/Bucket"
$ref: "#/components/schemas/BucketName"
- name: Range
in: header
description: The range of bytes to download. If not provided, the entire object will be downloaded.
Expand Down Expand Up @@ -442,12 +442,12 @@ paths:
example: "myDir/myFile"
minLength: 1
- name: bucket
description: The bucket the object belongs to
description: The name of the bucket the object belongs to
example: "myBucket"
in: query
required: true
schema:
$ref: "#/components/schemas/Bucket"
$ref: "#/components/schemas/BucketName"
- name: minshards
description: Used to override the minimum number of shards the object should be split into.
example: 10
Expand Down Expand Up @@ -516,12 +516,12 @@ paths:
example: "myDir/myFile"
minLength: 1
- name: bucket
description: The bucket the object belongs to
description: The name of the bucket the object belongs to
example: "myBucket"
in: query
required: true
schema:
$ref: "#/components/schemas/Bucket"
$ref: "#/components/schemas/BucketName"
responses:
"200":
description: Successfully deleted object
Expand All @@ -548,8 +548,8 @@ paths:
properties:
bucket:
allOf:
- $ref: "#/components/schemas/Bucket"
- description: The bucket the objects belong to
- $ref: "#/components/schemas/BucketName"
- description: The name of the bucket the objects belong to
prefix:
type: string
example: "myDir/"
Expand Down Expand Up @@ -969,9 +969,7 @@ paths:
type: object
properties:
name:
type: string
pattern: (?!(^xn--|.+-s3alias$))^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$
description: The name of the bucket
$ref: "#/components/schemas/BucketName"
policy:
type: object
properties:
Expand All @@ -981,10 +979,6 @@ paths:
responses:
"200":
description: Successfully saved buckets
content:
text/plain:
schema:
type: string
"400":
description: Malformed request
content:
Expand Down Expand Up @@ -1013,7 +1007,7 @@ paths:
in: path
required: true
schema:
type: string
$ref: "#/components/schemas/BucketName"
description: The name of the bucket
requestBody:
content:
Expand All @@ -1030,10 +1024,6 @@ paths:
responses:
"200":
description: Successfully updated bucket policy
content:
text/plain:
schema:
type: string
"400":
description: Malformed request
content:
Expand All @@ -1059,15 +1049,15 @@ paths:
in: path
required: true
schema:
type: string
$ref: "#/components/schemas/BucketName"
description: The name of the bucket
responses:
"200":
description: Successfully retrieved bucket
content:
application/json:
schema:
$ref: "#/components/schemas/Bucket"
$ref: "#/components/schemas/BucketName"
"404":
description: Bucket not found
content:
Expand All @@ -1082,7 +1072,7 @@ paths:
in: path
required: true
schema:
type: string
$ref: "#/components/schemas/BucketName"
description: The name of the bucket
responses:
"200":
Expand Down Expand Up @@ -1227,9 +1217,25 @@ components:
$ref: "#/components/schemas/HostsConfig"

Bucket:
type: object
properties:
name:
$ref: "#/components/schemas/BucketName"
policy:
type: object
properties:
publicReadAccess:
type: boolean
description: Whether the bucket is publicly readable
createdAt:
type: string
format: date-time
description: The time the bucket was created

BucketName:
type: string
pattern: (?!(^xn--|.+-s3alias$))^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$
description: A bucket logically groups together objects.
description: The name of the bucket.

BuildState:
type: object
Expand Down

0 comments on commit a474dc8

Please sign in to comment.