diff --git a/apps/reference/_storage/generated/config.mdx b/apps/reference/_storage/generated/config.mdx
index 93872d8d73e..2cfc75f1a27 100644
--- a/apps/reference/_storage/generated/config.mdx
+++ b/apps/reference/_storage/generated/config.mdx
@@ -11,280 +11,254 @@ A sample `.env` file is located in the [storage repository](https://github.com/s
Use this file to configure your environment variables for your Storage server.
+
+
+
## General {#general}
+
+
### `ANON_KEY` {#ANON_KEY}
A long-lived JWT with anonymous Postgres privileges.
+
- -
- Required:
true
-
- -
- Default:
None
-
+- Required:
true
+- Default:
None
+
### `SERVICE_KEY` {#SERVICE_KEY}
A long-lived JWT with Postgres privileges to bypass Row Level Security.
+
- -
- Required:
true
-
- -
- Default:
None
-
+- Required:
true
+- Default:
None
+
### `TENANT_ID` {#TENANT_ID}
The ID of a Storage tenant.
+
- -
- Required:
true
-
- -
- Default:
None
-
+- Required:
true
+- Default:
None
+
### `REGION` {#REGION}
Region of your S3 bucket.
+
- -
- Required:
true
-
- -
- Default:
None
-
+- Required:
true
+- Default:
None
+
### `GLOBAL_S3_BUCKET` {#GLOBAL_S3_BUCKET}
Name of your S3 bucket.
+
- -
- Required:
true
-
- -
- Default:
None
-
+- Required:
true
+- Default:
None
+
### `POSTGREST_URL` {#POSTGREST_URL}
The URL of your PostgREST server.
+
- -
- Required:
true
-
- -
- Default:
None
-
+- Required:
true
+- Default:
None
+
### `PGRST_JWT_SECRET` {#PGRST_JWT_SECRET}
A JWT Secret for the PostgREST database.
+
- -
- Required:
true
-
- -
- Default:
None
-
+- Required:
true
+- Default:
None
+
### `DATABASE_URL` {#DATABASE_URL}
The URL of your Postgres database.
+
- -
- Required:
true
-
- -
- Default:
None
-
+- Required:
true
+- Default:
None
+
### `PGOPTIONS` {#PGOPTIONS}
Additional configuration parameters for Postgres startup.
+
- -
- Required:
true
-
- -
- Default:
None
-
+- Required:
true
+- Default:
None
+
### `FILE_SIZE_LIMIT` {#FILE_SIZE_LIMIT}
The maximum file size allowed.
+
- -
- Required:
true
-
- -
- Default:
None
-
+- Required:
true
+- Default:
None
+
### `STORAGE_BACKEND` {#STORAGE_BACKEND}
The storage provider.
+
- -
- Required:
true
-
- -
- Default:
None
-
+- Required:
true
+- Default:
None
+
### `FILE_STORAGE_BACKEND_PATH` {#FILE_STORAGE_BACKEND_PATH}
The location storage when the "STORAGE_BACKEND" is set to "file".
+
- -
- Required:
true
-
- -
- Default:
None
-
+- Required:
true
+- Default:
None
+
+
+
## Multi-tenant {#multitenant}
+
+
### `IS_MULTITENANT` {#IS_MULTITENANT}
Operate across multiple tenants.
+
- -
- Required:
true
-
- -
- Default:
None
-
+- Required:
true
+- Default:
None
+
### `MULTITENANT_DATABASE_URL` {#MULTITENANT_DATABASE_URL}
The URL of the multitenant Postgres database.
+
- -
- Required:
true
-
- -
- Default:
None
-
+- Required:
true
+- Default:
None
+
### `X_FORWARDED_HOST_REGEXP` {#X_FORWARDED_HOST_REGEXP}
TBD.
+
- -
- Required:
true
-
- -
- Default:
None
-
+- Required:
true
+- Default:
None
+
### `POSTGREST_URL_SUFFIX` {#POSTGREST_URL_SUFFIX}
The suffix for the PostgREST instance.
+
- -
- Required:
true
-
- -
- Default:
None
-
+- Required:
true
+- Default:
None
+
### `ADMIN_API_KEYS` {#ADMIN_API_KEYS}
Secure API key for administrative endpoints.
+
- -
- Required:
true
-
- -
- Default:
None
-
+- Required:
true
+- Default:
None
+
### `ENCRYPTION_KEY` {#ENCRYPTION_KEY}
An key for encryting/decrypting secrets.
+
- -
- Required:
true
-
- -
- Default:
None
-
+- Required:
true
+- Default:
None
+
+
diff --git a/apps/reference/_storage/generated/usage.mdx b/apps/reference/_storage/generated/usage.mdx
index fc6d15eab32..9fbd3638b54 100644
--- a/apps/reference/_storage/generated/usage.mdx
+++ b/apps/reference/_storage/generated/usage.mdx
@@ -5,8 +5,9 @@ title: Usage
toc_max_heading_level: 3
---
-import Tabs from '@theme/Tabs'
-import TabItem from '@theme/TabItem'
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
@@ -14,10 +15,15 @@ API documentation for Supabase Storage
+
+
+
## Object {#object}
Object end-points
+
+
### Delete an object {#delete-an-object}
@@ -28,41 +34,69 @@ DELETE /object/{bucketName}/{wildcard}
+
#### Parameters
-
-
- bucketName
- required
- string
-
-
+
+
+ bucketName
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- *
- required
- string
-
-
+
+
+ *
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- authorization
- required
- string
-
-
+
+
+ authorization
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+
#### Responses
@@ -75,16 +109,59 @@ Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "Successfully deleted"
+ }
+ }
+ }
+}
+```
+
+
-
+
Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
@@ -93,70 +170,6 @@ Default Response
-
-
-### Deprecated (use GET /object/authenticated/{bucketName} instead): Retrieve an object {#deprecated-use-get-objectauthenticatedbucketname-instead-retrieve-an-object}
-
-```
-GET /object/{bucketName}/{wildcard}
-```
-
-
-
-#### Parameters
-
-
-
--
-
- bucketName
- required
- string
-
-
-
-
--
-
- *
- required
- string
-
-
-
-
--
-
- authorization
- required
- string
-
-
-
-
-
-
-
-
-
-
-#### Responses
-
-
-
-
-
-Default Response
-
-
-
-
-
-
-
-
-
-
@@ -168,41 +181,69 @@ PUT /object/{bucketName}/{wildcard}
+
#### Parameters
-
-
- bucketName
- required
- string
-
-
+
+
+ bucketName
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- *
- required
- string
-
-
+
+
+ *
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- authorization
- required
- string
-
-
+
+
+ authorization
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+
#### Responses
@@ -215,16 +256,62 @@ Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "Key": {
+ "type": "string",
+ "example": "projectref/avatars/folder/cat.png"
+ }
+ },
+ "required": [
+ "Key"
+ ]
+ }
+}
+```
+
+
-
+
Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
@@ -233,6 +320,7 @@ Default Response
+
### Upload a new object {#upload-a-new-object}
@@ -243,41 +331,69 @@ POST /object/{bucketName}/{wildcard}
+
#### Parameters
-
-
- bucketName
- required
- string
-
-
+
+
+ bucketName
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- *
- required
- string
-
-
+
+
+ *
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- authorization
- required
- string
-
-
+
+
+ authorization
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+
#### Responses
@@ -290,16 +406,62 @@ Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "Key": {
+ "type": "string",
+ "example": "avatars/folder/cat.png"
+ }
+ },
+ "required": [
+ "Key"
+ ]
+ }
+}
+```
+
+
-
+
Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
@@ -308,6 +470,7 @@ Default Response
+
### Delete multiple objects {#delete-multiple-objects}
@@ -318,41 +481,78 @@ DELETE /object/{bucketName}
+
#### Parameters
-
-
- body
- optional
-
-
-
+
+
+ bucketName
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- bucketName
- required
- string
-
-
-
-
--
-
- authorization
- required
- string
-
-
+
+
+ authorization
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+#### Body
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "prefixes": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "minItems": 1,
+ "example": [
+ "folder/cat.png",
+ "folder/morecats.png"
+ ]
+ }
+ },
+ "required": [
+ "prefixes"
+ ]
+ }
+}
+```
+
+
#### Responses
@@ -365,16 +565,170 @@ Default Response
+
+```json
+{
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "bucket_id": {
+ "type": "string"
+ },
+ "owner": {
+ "type": "string"
+ },
+ "id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "updated_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "created_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "last_accessed_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "metadata": {
+ "anyOf": [
+ {
+ "type": "object",
+ "additionalProperties": true
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "buckets": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "owner": {
+ "type": "string"
+ },
+ "public": {
+ "type": "boolean"
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false,
+ "example": {
+ "id": "bucket2",
+ "name": "bucket2",
+ "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
+ "created_at": "2021-02-17T04:43:32.770206+00:00",
+ "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ }
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "additionalProperties": false,
+ "title": "objectSchema",
+ "example": {
+ "name": "folder/cat.png",
+ "bucket_id": "avatars",
+ "owner": "317eadce-631a-4429-a0bb-f19a7a517b4a",
+ "id": "eaa8bdb5-2e00-4767-b5a9-d2502efe2196",
+ "updated_at": "2021-04-06T16:30:35.394674+00:00",
+ "created_at": "2021-04-06T16:30:35.394674+00:00",
+ "last_accessed_at": "2021-04-06T16:30:35.394674+00:00",
+ "metadata": {
+ "size": 1234
+ }
+ }
+ }
+ }
+}
+```
+
+
-
+
Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
@@ -383,6 +737,7 @@ Default Response
+
### Retrieve an object {#retrieve-an-object}
@@ -393,53 +748,108 @@ GET /object/authenticated/{bucketName}/{wildcard}
+
#### Parameters
-
-
- bucketName
- required
- string
-
-
+
+
+ bucketName
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- *
- required
- string
-
-
+
+
+ *
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- authorization
- required
- string
-
-
+
+
+ authorization
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+
#### Responses
-
+
Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
@@ -448,6 +858,7 @@ Default Response
+
### Generate a presigned url to retrieve an object {#generate-a-presigned-url-to-retrieve-an-object}
@@ -458,50 +869,89 @@ POST /object/sign/{bucketName}/{wildcard}
+
#### Parameters
-
-
- body
- optional
-
-
-
+
+
+ bucketName
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- bucketName
- required
- string
-
-
+
+
+ *
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- *
- required
- string
-
-
-
-
--
-
- authorization
- required
- string
-
-
+
+
+ authorization
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+#### Body
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "expiresIn": {
+ "type": "integer",
+ "minimum": 1,
+ "example": 60000
+ }
+ },
+ "required": [
+ "expiresIn"
+ ]
+ }
+}
+```
+
+
#### Responses
@@ -514,16 +964,62 @@ Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "signedURL": {
+ "type": "string",
+ "example": "/object/sign/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
+ }
+ },
+ "required": [
+ "signedURL"
+ ]
+ }
+}
+```
+
+
-
+
Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
@@ -532,6 +1028,7 @@ Default Response
+
### Retrieve an object via a presigned URL {#retrieve-an-object-via-a-presigned-url}
@@ -542,53 +1039,108 @@ GET /object/sign/{bucketName}/{wildcard}
+
#### Parameters
-
-
- token
- required
- string
-
-
+
+
+ token
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- bucketName
- required
- string
-
-
+
+
+ bucketName
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- *
- required
- string
-
-
+
+
+ *
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+
#### Responses
-
+
Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
@@ -597,6 +1149,7 @@ Default Response
+
### Generate presigned urls to retrieve objects {#generate-presigned-urls-to-retrieve-objects}
@@ -607,41 +1160,84 @@ POST /object/sign/{bucketName}
+
#### Parameters
-
-
- body
- optional
-
-
-
+
+
+ bucketName
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- bucketName
- required
- string
-
-
-
-
--
-
- authorization
- required
- string
-
-
+
+
+ authorization
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+#### Body
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "expiresIn": {
+ "type": "integer",
+ "minimum": 1,
+ "example": 60000
+ },
+ "paths": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "minItems": 1,
+ "example": [
+ "folder/cat.png",
+ "folder/morecats.png"
+ ]
+ }
+ },
+ "required": [
+ "expiresIn",
+ "paths"
+ ]
+ }
+}
+```
+
+
#### Responses
@@ -654,16 +1250,81 @@ Default Response
+
+```json
+{
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "error": [
+ "string",
+ "null"
+ ],
+ "example": "Either the object does not exist or you do not have access to it"
+ },
+ "path": {
+ "type": "string",
+ "example": "folder/cat.png"
+ },
+ "signedURL": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "example": "/object/sign/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
+ }
+ },
+ "required": [
+ "error",
+ "path",
+ "signedURL"
+ ]
+ }
+ }
+}
+```
+
+
-
+
Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
@@ -672,6 +1333,7 @@ Default Response
+
### Moves an object {#moves-an-object}
@@ -682,32 +1344,64 @@ POST /object/move
+
#### Parameters
-
-
- body
- optional
-
-
-
-
-
--
-
- authorization
- required
- string
-
-
+
+
+ authorization
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+#### Body
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "bucketId": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "sourceKey": {
+ "type": "string",
+ "example": "folder/cat.png"
+ },
+ "destinationKey": {
+ "type": "string",
+ "example": "folder/newcat.png"
+ }
+ },
+ "required": [
+ "bucketId",
+ "sourceKey",
+ "destinationKey"
+ ]
+ }
+}
+```
+
+
#### Responses
@@ -720,16 +1414,62 @@ Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "Successfully moved"
+ }
+ },
+ "required": [
+ "message"
+ ]
+ }
+}
+```
+
+
-
+
Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
@@ -738,6 +1478,7 @@ Default Response
+
### Search for objects under a prefix {#search-for-objects-under-a-prefix}
@@ -748,41 +1489,108 @@ POST /object/list/{bucketName}
+
#### Parameters
-
-
- body
- optional
-
-
-
+
+
+ bucketName
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- bucketName
- required
- string
-
-
-
-
--
-
- authorization
- required
- string
-
-
+
+
+ authorization
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+#### Body
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "prefix": {
+ "type": "string",
+ "example": "folder/subfolder"
+ },
+ "limit": {
+ "type": "integer",
+ "minimum": 1,
+ "example": 10
+ },
+ "offset": {
+ "type": "integer",
+ "minimum": 0,
+ "example": 0
+ },
+ "sortBy": {
+ "type": "object",
+ "properties": {
+ "column": {
+ "type": "string",
+ "enum": [
+ "name",
+ "updated_at",
+ "created_at",
+ "last_accessed_at"
+ ]
+ },
+ "order": {
+ "type": "string",
+ "enum": [
+ "asc",
+ "desc"
+ ]
+ }
+ },
+ "required": [
+ "column"
+ ]
+ },
+ "search": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "prefix"
+ ]
+ }
+}
+```
+
+
#### Responses
@@ -795,16 +1603,169 @@ Default Response
+
+```json
+{
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "bucket_id": {
+ "type": "string"
+ },
+ "owner": {
+ "type": "string"
+ },
+ "id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "updated_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "created_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "last_accessed_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "metadata": {
+ "anyOf": [
+ {
+ "type": "object",
+ "additionalProperties": true
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "buckets": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "owner": {
+ "type": "string"
+ },
+ "public": {
+ "type": "boolean"
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false,
+ "example": {
+ "id": "bucket2",
+ "name": "bucket2",
+ "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
+ "created_at": "2021-02-17T04:43:32.770206+00:00",
+ "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ }
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "additionalProperties": false,
+ "example": {
+ "name": "folder/cat.png",
+ "bucket_id": "avatars",
+ "owner": "317eadce-631a-4429-a0bb-f19a7a517b4a",
+ "id": "eaa8bdb5-2e00-4767-b5a9-d2502efe2196",
+ "updated_at": "2021-04-06T16:30:35.394674+00:00",
+ "created_at": "2021-04-06T16:30:35.394674+00:00",
+ "last_accessed_at": "2021-04-06T16:30:35.394674+00:00",
+ "metadata": {
+ "size": 1234
+ }
+ }
+ }
+ }
+}
+```
+
+
-
+
Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
@@ -813,6 +1774,7 @@ Default Response
+
### Copies an object {#copies-an-object}
@@ -823,32 +1785,64 @@ POST /object/copy
+
#### Parameters
-
-
- body
- optional
-
-
-
-
-
--
-
- authorization
- required
- string
-
-
+
+
+ authorization
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+#### Body
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "sourceKey": {
+ "type": "string",
+ "example": "folder/source.png"
+ },
+ "bucketId": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "destinationKey": {
+ "type": "string",
+ "example": "folder/destination.png"
+ }
+ },
+ "required": [
+ "sourceKey",
+ "bucketId",
+ "destinationKey"
+ ]
+ }
+}
+```
+
+
#### Responses
@@ -861,16 +1855,62 @@ Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "Key": {
+ "type": "string",
+ "example": "folder/destination.png"
+ }
+ },
+ "required": [
+ "Key"
+ ]
+ }
+}
+```
+
+
-
+
Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
@@ -879,6 +1919,7 @@ Default Response
+
### Retrieve an object from a public bucket {#retrieve-an-object-from-a-public-bucket}
@@ -889,44 +1930,91 @@ GET /object/public/{bucketName}/{wildcard}
+
#### Parameters
-
-
- bucketName
- required
- string
-
-
+
+
+ bucketName
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- *
- required
- string
-
-
+
+
+ *
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+
#### Responses
-
+
Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
@@ -935,10 +2023,14 @@ Default Response
+
+
## Bucket {#bucket}
Bucket end-points
+
+
### Create a bucket {#create-a-bucket}
@@ -949,32 +2041,62 @@ POST /bucket/
+
#### Parameters
-
-
- body
- optional
-
-
-
-
-
--
-
- authorization
- required
- string
-
-
+
+
+ authorization
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+#### Body
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "id": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "public": {
+ "type": "boolean",
+ "example": false
+ }
+ },
+ "required": [
+ "name"
+ ]
+ }
+}
+```
+
+
#### Responses
@@ -987,16 +2109,62 @@ Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "example": "avatars"
+ }
+ },
+ "required": [
+ "name"
+ ]
+ }
+}
+```
+
+
-
+
Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
@@ -1005,6 +2173,7 @@ Default Response
+
### Gets all buckets {#gets-all-buckets}
@@ -1015,23 +2184,35 @@ GET /bucket/
+
#### Parameters
-
-
- authorization
- required
- string
-
-
+
+
+ authorization
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+
#### Responses
@@ -1044,16 +2225,107 @@ Default Response
+
+```json
+{
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "owner": {
+ "type": "string"
+ },
+ "public": {
+ "type": "boolean"
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false,
+ "title": "bucketSchema",
+ "example": {
+ "id": "bucket2",
+ "name": "bucket2",
+ "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
+ "created_at": "2021-02-17T04:43:32.770206+00:00",
+ "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ }
+ },
+ "example": [
+ {
+ "id": "bucket2",
+ "name": "bucket2",
+ "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
+ "created_at": "2021-02-17T04:43:32.770206+00:00",
+ "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ }
+ ]
+ },
+ "example": [
+ {
+ "id": "bucket2",
+ "name": "bucket2",
+ "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
+ "created_at": "2021-02-17T04:43:32.770206+00:00",
+ "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ }
+ ]
+}
+```
+
+
-
+
Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
@@ -1062,6 +2334,7 @@ Default Response
+
### Empty a bucket {#empty-a-bucket}
@@ -1072,32 +2345,52 @@ POST /bucket/{bucketId}/empty
+
#### Parameters
-
-
- bucketId
- required
- string
-
-
+
+
+ bucketId
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- authorization
- required
- string
-
-
+
+
+ authorization
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+
#### Responses
@@ -1110,16 +2403,59 @@ Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "Successfully emptied"
+ }
+ }
+ }
+}
+```
+
+
-
+
Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
@@ -1128,6 +2464,7 @@ Default Response
+
### Get details of a bucket {#get-details-of-a-bucket}
@@ -1138,32 +2475,52 @@ GET /bucket/{bucketId}
+
#### Parameters
-
-
- bucketId
- required
- string
-
-
+
+
+ bucketId
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- authorization
- required
- string
-
-
+
+
+ authorization
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+
#### Responses
@@ -1176,16 +2533,92 @@ Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "owner": {
+ "type": "string"
+ },
+ "public": {
+ "type": "boolean"
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false,
+ "example": {
+ "id": "bucket2",
+ "name": "bucket2",
+ "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
+ "created_at": "2021-02-17T04:43:32.770206+00:00",
+ "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ }
+ },
+ "example": {
+ "id": "bucket2",
+ "name": "bucket2",
+ "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
+ "created_at": "2021-02-17T04:43:32.770206+00:00",
+ "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ }
+}
+```
+
+
-
+
Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
@@ -1194,6 +2627,7 @@ Default Response
+
### Update properties of a bucket {#update-properties-of-a-bucket}
@@ -1204,32 +2638,51 @@ PUT /bucket/{bucketId}
+
#### Parameters
-
-
- body
- optional
-
-
-
-
-
--
-
- authorization
- required
- string
-
-
+
+
+ authorization
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+#### Body
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "public": {
+ "type": "boolean",
+ "example": false
+ }
+ }
+ }
+}
+```
+
+
#### Responses
@@ -1242,16 +2695,62 @@ Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "Successfully updated"
+ }
+ },
+ "required": [
+ "message"
+ ]
+ }
+}
+```
+
+
-
+
Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
@@ -1260,6 +2759,7 @@ Default Response
+
### Delete a bucket {#delete-a-bucket}
@@ -1270,32 +2770,52 @@ DELETE /bucket/{bucketId}
+
#### Parameters
-
-
- bucketId
- required
- string
-
-
+
+
+ bucketId
+
+
+ required
+
+
+
+
+
+
+
+
-
-
- authorization
- required
- string
-
-
+
+
+ authorization
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+
#### Responses
@@ -1308,16 +2828,59 @@ Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "Successfully deleted"
+ }
+ }
+ }
+}
+```
+
+
-
+
Default Response
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
@@ -1325,3 +2888,132 @@ Default Response
+
+
+
+## Deprecated {#deprecated}
+
+Deprecated end-points
+
+
+
+
+
+### Get object (deprecated) {#get-object-deprecated}
+
+```
+GET /object/{bucketName}/{wildcard}
+```
+
+
+
+
+#### Parameters
+
+
+
+-
+
+
+ bucketName
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+-
+
+
+ *
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+-
+
+
+ authorization
+
+
+ required
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#### Responses
+
+
+
+
+
+Default Response
+
+
+
+
+```json
+{
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
+}
+```
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/generator/src/docs/api.ts b/packages/generator/src/docs/api.ts
index c7672196fc3..9c90f22400c 100644
--- a/packages/generator/src/docs/api.ts
+++ b/packages/generator/src/docs/api.ts
@@ -17,6 +17,7 @@ export default async function gen(
switch (spec.openapi || spec.swagger) {
case '3.0.0':
+ case '3.0.3':
await gen_v3(spec, outputDir, { apiUrl })
break
diff --git a/spec/storage_v0_openapi.json b/spec/storage_v0_openapi.json
index 4c2de7ba34d..252aeaabdbb 100644
--- a/spec/storage_v0_openapi.json
+++ b/spec/storage_v0_openapi.json
@@ -1,26 +1,28 @@
{
- "swagger": "2.0",
+ "openapi": "3.0.3",
"info": {
"title": "Supabase Storage API",
"description": "API documentation for Supabase Storage",
"version": "0.0.1"
},
- "definitions": {
- "def-0": {
- "type": "object",
- "properties": { "authorization": { "type": "string" } },
- "required": ["authorization"],
- "title": "authSchema"
- },
- "def-1": {
- "type": "object",
- "properties": {
- "statusCode": { "type": "string" },
- "error": { "type": "string" },
- "message": { "type": "string" }
+ "components": {
+ "schemas": {
+ "def-0": {
+ "type": "object",
+ "properties": { "authorization": { "type": "string" } },
+ "required": ["authorization"],
+ "title": "authSchema"
},
- "required": ["statusCode", "error", "message"],
- "title": "errorSchema"
+ "def-1": {
+ "type": "object",
+ "properties": {
+ "statusCode": { "type": "string" },
+ "error": { "type": "string" },
+ "message": { "type": "string" }
+ },
+ "required": ["statusCode", "error", "message"],
+ "title": "errorSchema"
+ }
}
},
"paths": {
@@ -28,71 +30,101 @@
"post": {
"summary": "Create a bucket",
"tags": ["bucket"],
- "parameters": [
- {
- "name": "body",
- "in": "body",
- "schema": {
- "type": "object",
- "properties": {
- "name": { "type": "string", "examples": ["avatars"] },
- "id": { "type": "string", "examples": ["avatars"] },
- "public": { "type": "boolean", "examples": [false] }
- },
- "required": ["name"]
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": { "type": "string", "example": "avatars" },
+ "id": { "type": "string", "example": "avatars" },
+ "public": { "type": "boolean", "example": false }
+ },
+ "required": ["name"]
+ }
}
},
- { "in": "header", "name": "authorization", "required": true, "type": "string" }
+ "required": true
+ },
+ "parameters": [
+ {
+ "in": "header",
+ "name": "authorization",
+ "required": true,
+ "schema": { "type": "string" }
+ }
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": { "name": { "type": "string", "examples": ["avatars"] } },
- "required": ["name"]
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": { "name": { "type": "string", "example": "avatars" } },
+ "required": ["name"]
+ }
+ }
}
},
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
},
"get": {
"summary": "Gets all buckets",
"tags": ["bucket"],
"parameters": [
- { "in": "header", "name": "authorization", "required": true, "type": "string" }
+ {
+ "in": "header",
+ "name": "authorization",
+ "required": true,
+ "schema": { "type": "string" }
+ }
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "array",
- "items": {
- "$id": "bucketSchema",
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "name": { "type": "string" },
- "owner": { "type": "string" },
- "public": { "type": "boolean" },
- "created_at": { "type": "string" },
- "updated_at": { "type": "string" }
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "name": { "type": "string" },
+ "owner": { "type": "string" },
+ "public": { "type": "boolean" },
+ "created_at": { "type": "string" },
+ "updated_at": { "type": "string" }
+ },
+ "required": ["id", "name"],
+ "additionalProperties": false,
+ "title": "bucketSchema",
+ "example": {
+ "id": "bucket2",
+ "name": "bucket2",
+ "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
+ "created_at": "2021-02-17T04:43:32.770206+00:00",
+ "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ }
+ },
+ "example": [
+ {
+ "id": "bucket2",
+ "name": "bucket2",
+ "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
+ "created_at": "2021-02-17T04:43:32.770206+00:00",
+ "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ }
+ ]
},
- "required": ["id", "name"],
- "additionalProperties": false,
- "examples": [
- {
- "id": "bucket2",
- "name": "bucket2",
- "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
- "created_at": "2021-02-17T04:43:32.770206+00:00",
- "updated_at": "2021-02-17T04:43:32.770206+00:00"
- }
- ],
- "title": "bucketSchema"
- },
- "examples": [
- [
+ "example": [
{
"id": "bucket2",
"name": "bucket2",
@@ -101,10 +133,15 @@
"updated_at": "2021-02-17T04:43:32.770206+00:00"
}
]
- ]
+ }
}
},
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
}
},
@@ -114,25 +151,39 @@
"tags": ["bucket"],
"parameters": [
{
- "type": "string",
- "examples": ["avatars"],
- "required": true,
+ "schema": { "type": "string", "example": "avatars" },
+ "example": "avatars",
"in": "path",
- "name": "bucketId"
+ "name": "bucketId",
+ "required": true
},
- { "in": "header", "name": "authorization", "required": true, "type": "string" }
+ {
+ "in": "header",
+ "name": "authorization",
+ "required": true,
+ "schema": { "type": "string" }
+ }
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "message": { "type": "string", "examples": ["Successfully emptied"] }
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": { "type": "string", "example": "Successfully emptied" }
+ }
+ }
}
}
},
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
}
},
@@ -142,70 +193,104 @@
"tags": ["bucket"],
"parameters": [
{
- "type": "string",
- "examples": ["avatars"],
- "required": true,
+ "schema": { "type": "string", "example": "avatars" },
+ "example": "avatars",
"in": "path",
- "name": "bucketId"
+ "name": "bucketId",
+ "required": true
},
- { "in": "header", "name": "authorization", "required": true, "type": "string" }
+ {
+ "in": "header",
+ "name": "authorization",
+ "required": true,
+ "schema": { "type": "string" }
+ }
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "$id": "todo.com",
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "name": { "type": "string" },
- "owner": { "type": "string" },
- "public": { "type": "boolean" },
- "created_at": { "type": "string" },
- "updated_at": { "type": "string" }
- },
- "required": ["id", "name"],
- "additionalProperties": false,
- "examples": [
- {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "name": { "type": "string" },
+ "owner": { "type": "string" },
+ "public": { "type": "boolean" },
+ "created_at": { "type": "string" },
+ "updated_at": { "type": "string" }
+ },
+ "required": ["id", "name"],
+ "additionalProperties": false,
+ "example": {
+ "id": "bucket2",
+ "name": "bucket2",
+ "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
+ "created_at": "2021-02-17T04:43:32.770206+00:00",
+ "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ }
+ },
+ "example": {
"id": "bucket2",
"name": "bucket2",
"owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
"created_at": "2021-02-17T04:43:32.770206+00:00",
"updated_at": "2021-02-17T04:43:32.770206+00:00"
}
- ]
+ }
}
},
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
},
"put": {
"summary": "Update properties of a bucket",
"tags": ["bucket"],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": { "public": { "type": "boolean", "example": false } }
+ }
+ }
+ }
+ },
"parameters": [
{
- "name": "body",
- "in": "body",
- "schema": {
- "type": "object",
- "properties": { "public": { "type": "boolean", "examples": [false] } }
- }
- },
- { "in": "header", "name": "authorization", "required": true, "type": "string" }
+ "in": "header",
+ "name": "authorization",
+ "required": true,
+ "schema": { "type": "string" }
+ }
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "message": { "type": "string", "examples": ["Successfully updated"] }
- },
- "required": ["message"]
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": { "type": "string", "example": "Successfully updated" }
+ },
+ "required": ["message"]
+ }
+ }
}
},
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
},
"delete": {
@@ -213,25 +298,39 @@
"tags": ["bucket"],
"parameters": [
{
- "type": "string",
- "examples": ["avatars"],
- "required": true,
+ "schema": { "type": "string", "example": "avatars" },
+ "example": "avatars",
"in": "path",
- "name": "bucketId"
+ "name": "bucketId",
+ "required": true
},
- { "in": "header", "name": "authorization", "required": true, "type": "string" }
+ {
+ "in": "header",
+ "name": "authorization",
+ "required": true,
+ "schema": { "type": "string" }
+ }
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "message": { "type": "string", "examples": ["Successfully deleted"] }
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": { "type": "string", "example": "Successfully deleted" }
+ }
+ }
}
}
},
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
}
},
@@ -241,57 +340,81 @@
"tags": ["object"],
"parameters": [
{
- "type": "string",
- "examples": ["avatars"],
- "required": true,
+ "schema": { "type": "string", "example": "avatars" },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
- "type": "string",
- "examples": ["folder/cat.png"],
- "required": true,
+ "schema": { "type": "string", "example": "folder/cat.png" },
+ "example": "folder/cat.png",
"in": "path",
- "name": "*"
+ "name": "*",
+ "required": true
},
- { "in": "header", "name": "authorization", "required": true, "type": "string" }
+ {
+ "in": "header",
+ "name": "authorization",
+ "required": true,
+ "schema": { "type": "string" }
+ }
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "message": { "type": "string", "examples": ["Successfully deleted"] }
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": { "type": "string", "example": "Successfully deleted" }
+ }
+ }
}
}
},
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
},
"get": {
"summary": "Get object (deprecated)",
- "description": "use GET /object/authenticated/{bucketName} instead",
"tags": ["deprecated"],
+ "description": "use GET /object/authenticated/{bucketName} instead",
"parameters": [
{
- "type": "string",
- "examples": ["avatars"],
- "required": true,
+ "schema": { "type": "string", "example": "avatars" },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
- "type": "string",
- "examples": ["folder/cat.png"],
- "required": true,
+ "schema": { "type": "string", "example": "folder/cat.png" },
+ "example": "folder/cat.png",
"in": "path",
- "name": "*"
+ "name": "*",
+ "required": true
},
- { "in": "header", "name": "authorization", "required": true, "type": "string" }
+ {
+ "in": "header",
+ "name": "authorization",
+ "required": true,
+ "schema": { "type": "string" }
+ }
],
"responses": {
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
},
"put": {
@@ -299,33 +422,47 @@
"tags": ["object"],
"parameters": [
{
- "type": "string",
- "examples": ["avatars"],
- "required": true,
+ "schema": { "type": "string", "example": "avatars" },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
- "type": "string",
- "examples": ["folder/cat.png"],
- "required": true,
+ "schema": { "type": "string", "example": "folder/cat.png" },
+ "example": "folder/cat.png",
"in": "path",
- "name": "*"
+ "name": "*",
+ "required": true
},
- { "in": "header", "name": "authorization", "required": true, "type": "string" }
+ {
+ "in": "header",
+ "name": "authorization",
+ "required": true,
+ "schema": { "type": "string" }
+ }
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "Key": { "type": "string", "examples": ["projectref/avatars/folder/cat.png"] }
- },
- "required": ["Key"]
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "Key": { "type": "string", "example": "projectref/avatars/folder/cat.png" }
+ },
+ "required": ["Key"]
+ }
+ }
}
},
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
},
"post": {
@@ -333,31 +470,47 @@
"tags": ["object"],
"parameters": [
{
- "type": "string",
- "examples": ["avatars"],
- "required": true,
+ "schema": { "type": "string", "example": "avatars" },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
- "type": "string",
- "examples": ["folder/cat.png"],
- "required": true,
+ "schema": { "type": "string", "example": "folder/cat.png" },
+ "example": "folder/cat.png",
"in": "path",
- "name": "*"
+ "name": "*",
+ "required": true
},
- { "in": "header", "name": "authorization", "required": true, "type": "string" }
+ {
+ "in": "header",
+ "name": "authorization",
+ "required": true,
+ "schema": { "type": "string" }
+ }
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": { "Key": { "type": "string", "examples": ["avatars/folder/cat.png"] } },
- "required": ["Key"]
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "Key": { "type": "string", "example": "avatars/folder/cat.png" }
+ },
+ "required": ["Key"]
+ }
+ }
}
},
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
}
},
@@ -365,97 +518,108 @@
"delete": {
"summary": "Delete multiple objects",
"tags": ["object"],
- "parameters": [
- {
- "name": "body",
- "in": "body",
- "schema": {
- "type": "object",
- "properties": {
- "prefixes": {
- "type": "array",
- "items": { "type": "string" },
- "minItems": 1,
- "examples": [["folder/cat.png", "folder/morecats.png"]]
- }
- },
- "required": ["prefixes"]
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "prefixes": {
+ "type": "array",
+ "items": { "type": "string" },
+ "minItems": 1,
+ "example": ["folder/cat.png", "folder/morecats.png"]
+ }
+ },
+ "required": ["prefixes"]
+ }
}
},
+ "required": true
+ },
+ "parameters": [
{
- "type": "string",
- "examples": ["avatars"],
- "required": true,
+ "schema": { "type": "string", "example": "avatars" },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
- { "in": "header", "name": "authorization", "required": true, "type": "string" }
+ {
+ "in": "header",
+ "name": "authorization",
+ "required": true,
+ "schema": { "type": "string" }
+ }
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "array",
- "items": {
- "$id": "objectSchema",
- "type": "object",
- "properties": {
- "name": { "type": "string" },
- "bucket_id": { "type": "string" },
- "owner": { "type": "string" },
- "id": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
- "updated_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
- "created_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
- "last_accessed_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
- "metadata": {
- "anyOf": [
- { "type": "object", "additionalProperties": true },
- { "type": "null" }
- ]
- },
- "buckets": {
- "$id": "bucketSchema",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
"type": "object",
"properties": {
- "id": { "type": "string" },
"name": { "type": "string" },
+ "bucket_id": { "type": "string" },
"owner": { "type": "string" },
- "public": { "type": "boolean" },
- "created_at": { "type": "string" },
- "updated_at": { "type": "string" }
- },
- "required": ["id", "name"],
- "additionalProperties": false,
- "examples": [
- {
- "id": "bucket2",
- "name": "bucket2",
- "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
- "created_at": "2021-02-17T04:43:32.770206+00:00",
- "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ "id": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
+ "updated_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
+ "created_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
+ "last_accessed_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
+ "metadata": {
+ "anyOf": [
+ { "type": "object", "additionalProperties": true },
+ { "type": "null" }
+ ]
+ },
+ "buckets": {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "name": { "type": "string" },
+ "owner": { "type": "string" },
+ "public": { "type": "boolean" },
+ "created_at": { "type": "string" },
+ "updated_at": { "type": "string" }
+ },
+ "required": ["id", "name"],
+ "additionalProperties": false,
+ "example": {
+ "id": "bucket2",
+ "name": "bucket2",
+ "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
+ "created_at": "2021-02-17T04:43:32.770206+00:00",
+ "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ }
}
- ]
+ },
+ "required": ["name"],
+ "additionalProperties": false,
+ "title": "objectSchema",
+ "example": {
+ "name": "folder/cat.png",
+ "bucket_id": "avatars",
+ "owner": "317eadce-631a-4429-a0bb-f19a7a517b4a",
+ "id": "eaa8bdb5-2e00-4767-b5a9-d2502efe2196",
+ "updated_at": "2021-04-06T16:30:35.394674+00:00",
+ "created_at": "2021-04-06T16:30:35.394674+00:00",
+ "last_accessed_at": "2021-04-06T16:30:35.394674+00:00",
+ "metadata": { "size": 1234 }
+ }
}
- },
- "required": ["name"],
- "additionalProperties": false,
- "examples": [
- {
- "name": "folder/cat.png",
- "bucket_id": "avatars",
- "owner": "317eadce-631a-4429-a0bb-f19a7a517b4a",
- "id": "eaa8bdb5-2e00-4767-b5a9-d2502efe2196",
- "updated_at": "2021-04-06T16:30:35.394674+00:00",
- "created_at": "2021-04-06T16:30:35.394674+00:00",
- "last_accessed_at": "2021-04-06T16:30:35.394674+00:00",
- "metadata": { "size": 1234 }
- }
- ],
- "title": "objectSchema"
+ }
}
}
},
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
}
},
@@ -465,23 +629,33 @@
"tags": ["object"],
"parameters": [
{
- "type": "string",
- "examples": ["avatars"],
- "required": true,
+ "schema": { "type": "string", "example": "avatars" },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
- "type": "string",
- "examples": ["folder/cat.png"],
- "required": true,
+ "schema": { "type": "string", "example": "folder/cat.png" },
+ "example": "folder/cat.png",
"in": "path",
- "name": "*"
+ "name": "*",
+ "required": true
},
- { "in": "header", "name": "authorization", "required": true, "type": "string" }
+ {
+ "in": "header",
+ "name": "authorization",
+ "required": true,
+ "schema": { "type": "string" }
+ }
],
"responses": {
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
}
},
@@ -489,51 +663,66 @@
"post": {
"summary": "Generate a presigned url to retrieve an object",
"tags": ["object"],
- "parameters": [
- {
- "name": "body",
- "in": "body",
- "schema": {
- "type": "object",
- "properties": {
- "expiresIn": { "type": "integer", "minimum": 1, "examples": [60000] }
- },
- "required": ["expiresIn"]
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "expiresIn": { "type": "integer", "minimum": 1, "example": 60000 }
+ },
+ "required": ["expiresIn"]
+ }
}
},
+ "required": true
+ },
+ "parameters": [
{
- "type": "string",
- "examples": ["avatars"],
- "required": true,
+ "schema": { "type": "string", "example": "avatars" },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
- "type": "string",
- "examples": ["folder/cat.png"],
- "required": true,
+ "schema": { "type": "string", "example": "folder/cat.png" },
+ "example": "folder/cat.png",
"in": "path",
- "name": "*"
+ "name": "*",
+ "required": true
},
- { "in": "header", "name": "authorization", "required": true, "type": "string" }
+ {
+ "in": "header",
+ "name": "authorization",
+ "required": true,
+ "schema": { "type": "string" }
+ }
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "signedURL": {
- "type": "string",
- "examples": [
- "/object/sign/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
- ]
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "signedURL": {
+ "type": "string",
+ "example": "/object/sign/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
+ }
+ },
+ "required": ["signedURL"]
}
- },
- "required": ["signedURL"]
+ }
}
},
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
},
"get": {
@@ -541,31 +730,37 @@
"tags": ["object"],
"parameters": [
{
- "type": "string",
- "examples": [
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJidWNrZXQyL3B1YmxpYy9zYWRjYXQtdXBsb2FkMjMucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.uBQcXzuvXxfw-9WgzWMBfE_nR3VOgpvfZe032sfLSSk"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJidWNrZXQyL3B1YmxpYy9zYWRjYXQtdXBsb2FkMjMucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.uBQcXzuvXxfw-9WgzWMBfE_nR3VOgpvfZe032sfLSSk"
+ },
+ "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJidWNrZXQyL3B1YmxpYy9zYWRjYXQtdXBsb2FkMjMucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.uBQcXzuvXxfw-9WgzWMBfE_nR3VOgpvfZe032sfLSSk",
"in": "query",
- "name": "token"
+ "name": "token",
+ "required": true
},
{
- "type": "string",
- "examples": ["avatars"],
- "required": true,
+ "schema": { "type": "string", "example": "avatars" },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
- "type": "string",
- "examples": ["folder/cat.png"],
- "required": true,
+ "schema": { "type": "string", "example": "folder/cat.png" },
+ "example": "folder/cat.png",
"in": "path",
- "name": "*"
+ "name": "*",
+ "required": true
}
],
"responses": {
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
}
},
@@ -573,58 +768,73 @@
"post": {
"summary": "Generate presigned urls to retrieve objects",
"tags": ["object"],
- "parameters": [
- {
- "name": "body",
- "in": "body",
- "schema": {
- "type": "object",
- "properties": {
- "expiresIn": { "type": "integer", "minimum": 1, "examples": [60000] },
- "paths": {
- "type": "array",
- "items": { "type": "string" },
- "minItems": 1,
- "examples": [["folder/cat.png", "folder/morecats.png"]]
- }
- },
- "required": ["expiresIn", "paths"]
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "expiresIn": { "type": "integer", "minimum": 1, "example": 60000 },
+ "paths": {
+ "type": "array",
+ "items": { "type": "string" },
+ "minItems": 1,
+ "example": ["folder/cat.png", "folder/morecats.png"]
+ }
+ },
+ "required": ["expiresIn", "paths"]
+ }
}
},
+ "required": true
+ },
+ "parameters": [
{
- "type": "string",
- "examples": ["avatars"],
- "required": true,
+ "schema": { "type": "string", "example": "avatars" },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
- { "in": "header", "name": "authorization", "required": true, "type": "string" }
+ {
+ "in": "header",
+ "name": "authorization",
+ "required": true,
+ "schema": { "type": "string" }
+ }
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "error": {
- "error": ["string", "null"],
- "examples": ["Either the object does not exist or you do not have access to it"]
- },
- "path": { "type": "string", "examples": ["folder/cat.png"] },
- "signedURL": {
- "type": ["string", "null"],
- "examples": [
- "/object/sign/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
- ]
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "error": ["string", "null"],
+ "example": "Either the object does not exist or you do not have access to it"
+ },
+ "path": { "type": "string", "example": "folder/cat.png" },
+ "signedURL": {
+ "type": ["string", "null"],
+ "example": "/object/sign/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
+ }
+ },
+ "required": ["error", "path", "signedURL"]
}
- },
- "required": ["error", "path", "signedURL"]
+ }
}
}
},
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
}
},
@@ -632,32 +842,51 @@
"post": {
"summary": "Moves an object",
"tags": ["object"],
- "parameters": [
- {
- "name": "body",
- "in": "body",
- "schema": {
- "type": "object",
- "properties": {
- "bucketId": { "type": "string", "examples": ["avatars"] },
- "sourceKey": { "type": "string", "examples": ["folder/cat.png"] },
- "destinationKey": { "type": "string", "examples": ["folder/newcat.png"] }
- },
- "required": ["bucketId", "sourceKey", "destinationKey"]
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "bucketId": { "type": "string", "example": "avatars" },
+ "sourceKey": { "type": "string", "example": "folder/cat.png" },
+ "destinationKey": { "type": "string", "example": "folder/newcat.png" }
+ },
+ "required": ["bucketId", "sourceKey", "destinationKey"]
+ }
}
},
- { "in": "header", "name": "authorization", "required": true, "type": "string" }
+ "required": true
+ },
+ "parameters": [
+ {
+ "in": "header",
+ "name": "authorization",
+ "required": true,
+ "schema": { "type": "string" }
+ }
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": { "message": { "type": "string", "examples": ["Successfully moved"] } },
- "required": ["message"]
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": { "type": "string", "example": "Successfully moved" }
+ },
+ "required": ["message"]
+ }
+ }
}
},
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
}
},
@@ -665,99 +894,110 @@
"post": {
"summary": "Search for objects under a prefix",
"tags": ["object"],
- "parameters": [
- {
- "name": "body",
- "in": "body",
- "schema": {
- "type": "object",
- "properties": {
- "prefix": { "type": "string", "examples": ["folder/subfolder"] },
- "limit": { "type": "integer", "minimum": 1, "examples": [10] },
- "offset": { "type": "integer", "minimum": 0, "examples": [0] },
- "sortBy": {
- "type": "object",
- "properties": {
- "column": {
- "type": "string",
- "enum": ["name", "updated_at", "created_at", "last_accessed_at"]
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "prefix": { "type": "string", "example": "folder/subfolder" },
+ "limit": { "type": "integer", "minimum": 1, "example": 10 },
+ "offset": { "type": "integer", "minimum": 0, "example": 0 },
+ "sortBy": {
+ "type": "object",
+ "properties": {
+ "column": {
+ "type": "string",
+ "enum": ["name", "updated_at", "created_at", "last_accessed_at"]
+ },
+ "order": { "type": "string", "enum": ["asc", "desc"] }
},
- "order": { "type": "string", "enum": ["asc", "desc"] }
+ "required": ["column"]
},
- "required": ["column"]
+ "search": { "type": "string" }
},
- "search": { "type": "string" }
- },
- "required": ["prefix"]
+ "required": ["prefix"]
+ }
}
},
- { "type": "string", "required": true, "in": "path", "name": "bucketName" },
- { "in": "header", "name": "authorization", "required": true, "type": "string" }
+ "required": true
+ },
+ "parameters": [
+ { "schema": { "type": "string" }, "in": "path", "name": "bucketName", "required": true },
+ {
+ "in": "header",
+ "name": "authorization",
+ "required": true,
+ "schema": { "type": "string" }
+ }
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "array",
- "items": {
- "$id": "objectSchema",
- "type": "object",
- "properties": {
- "name": { "type": "string" },
- "bucket_id": { "type": "string" },
- "owner": { "type": "string" },
- "id": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
- "updated_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
- "created_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
- "last_accessed_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
- "metadata": {
- "anyOf": [
- { "type": "object", "additionalProperties": true },
- { "type": "null" }
- ]
- },
- "buckets": {
- "$id": "bucketSchema",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
"type": "object",
"properties": {
- "id": { "type": "string" },
"name": { "type": "string" },
+ "bucket_id": { "type": "string" },
"owner": { "type": "string" },
- "public": { "type": "boolean" },
- "created_at": { "type": "string" },
- "updated_at": { "type": "string" }
- },
- "required": ["id", "name"],
- "additionalProperties": false,
- "examples": [
- {
- "id": "bucket2",
- "name": "bucket2",
- "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
- "created_at": "2021-02-17T04:43:32.770206+00:00",
- "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ "id": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
+ "updated_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
+ "created_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
+ "last_accessed_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
+ "metadata": {
+ "anyOf": [
+ { "type": "object", "additionalProperties": true },
+ { "type": "null" }
+ ]
+ },
+ "buckets": {
+ "type": "object",
+ "properties": {
+ "id": { "type": "string" },
+ "name": { "type": "string" },
+ "owner": { "type": "string" },
+ "public": { "type": "boolean" },
+ "created_at": { "type": "string" },
+ "updated_at": { "type": "string" }
+ },
+ "required": ["id", "name"],
+ "additionalProperties": false,
+ "example": {
+ "id": "bucket2",
+ "name": "bucket2",
+ "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
+ "created_at": "2021-02-17T04:43:32.770206+00:00",
+ "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ }
}
- ]
+ },
+ "required": ["name"],
+ "additionalProperties": false,
+ "example": {
+ "name": "folder/cat.png",
+ "bucket_id": "avatars",
+ "owner": "317eadce-631a-4429-a0bb-f19a7a517b4a",
+ "id": "eaa8bdb5-2e00-4767-b5a9-d2502efe2196",
+ "updated_at": "2021-04-06T16:30:35.394674+00:00",
+ "created_at": "2021-04-06T16:30:35.394674+00:00",
+ "last_accessed_at": "2021-04-06T16:30:35.394674+00:00",
+ "metadata": { "size": 1234 }
+ }
}
- },
- "required": ["name"],
- "additionalProperties": false,
- "examples": [
- {
- "name": "folder/cat.png",
- "bucket_id": "avatars",
- "owner": "317eadce-631a-4429-a0bb-f19a7a517b4a",
- "id": "eaa8bdb5-2e00-4767-b5a9-d2502efe2196",
- "updated_at": "2021-04-06T16:30:35.394674+00:00",
- "created_at": "2021-04-06T16:30:35.394674+00:00",
- "last_accessed_at": "2021-04-06T16:30:35.394674+00:00",
- "metadata": { "size": 1234 }
- }
- ]
+ }
}
}
},
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
}
},
@@ -765,32 +1005,51 @@
"post": {
"summary": "Copies an object",
"tags": ["object"],
- "parameters": [
- {
- "name": "body",
- "in": "body",
- "schema": {
- "type": "object",
- "properties": {
- "sourceKey": { "type": "string", "examples": ["folder/source.png"] },
- "bucketId": { "type": "string", "examples": ["avatars"] },
- "destinationKey": { "type": "string", "examples": ["folder/destination.png"] }
- },
- "required": ["sourceKey", "bucketId", "destinationKey"]
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "sourceKey": { "type": "string", "example": "folder/source.png" },
+ "bucketId": { "type": "string", "example": "avatars" },
+ "destinationKey": { "type": "string", "example": "folder/destination.png" }
+ },
+ "required": ["sourceKey", "bucketId", "destinationKey"]
+ }
}
},
- { "in": "header", "name": "authorization", "required": true, "type": "string" }
+ "required": true
+ },
+ "parameters": [
+ {
+ "in": "header",
+ "name": "authorization",
+ "required": true,
+ "schema": { "type": "string" }
+ }
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": { "Key": { "type": "string", "examples": ["folder/destination.png"] } },
- "required": ["Key"]
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "Key": { "type": "string", "example": "folder/destination.png" }
+ },
+ "required": ["Key"]
+ }
+ }
}
},
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
}
},
@@ -800,22 +1059,27 @@
"tags": ["object"],
"parameters": [
{
- "type": "string",
- "examples": ["avatars"],
- "required": true,
+ "schema": { "type": "string", "example": "avatars" },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
- "type": "string",
- "examples": ["folder/cat.png"],
- "required": true,
+ "schema": { "type": "string", "example": "folder/cat.png" },
+ "example": "folder/cat.png",
"in": "path",
- "name": "*"
+ "name": "*",
+ "required": true
}
],
"responses": {
- "400": { "description": "Default Response", "schema": { "$ref": "#/definitions/def-1" } }
+ "4XX": {
+ "description": "Default Response",
+ "content": {
+ "application/json": { "schema": { "$ref": "#/components/schemas/def-1" } }
+ }
+ }
}
}
}
diff --git a/spec/transforms/api_v0_openapi_deparsed.json b/spec/transforms/api_v0_openapi_deparsed.json
index 0f50500c5c6..c1c3ea4c467 100644
--- a/spec/transforms/api_v0_openapi_deparsed.json
+++ b/spec/transforms/api_v0_openapi_deparsed.json
@@ -889,6 +889,112 @@
}
]
}
+ },
+ "/v1/projects/{ref}/pgsodium": {
+ "get": {
+ "operationId": "getConfig",
+ "summary": "Gets project's pgsodium config",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to retrieve project's pgsodium config"
+ }
+ },
+ "tags": [
+ "pgsodium (beta)"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ },
+ "put": {
+ "operationId": "updateConfig",
+ "summary": "Updates project's pgsodium config. Updating the root_key can cause all data encrypted with the older key to become inaccessible.",
+ "parameters": [
+ {
+ "name": "ref",
+ "required": true,
+ "in": "path",
+ "description": "Project ref",
+ "schema": {
+ "minLength": 20,
+ "maxLength": 20,
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "root_key": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "root_key"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": ""
+ },
+ "500": {
+ "description": "Failed to update project's pgsodium config"
+ }
+ },
+ "tags": [
+ "pgsodium (beta)"
+ ],
+ "security": [
+ {
+ "bearer": []
+ }
+ ]
+ }
}
},
"info": {
@@ -1171,6 +1277,17 @@
"name",
"value"
]
+ },
+ "UpdatePgsodiumConfigBody": {
+ "type": "object",
+ "properties": {
+ "root_key": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "root_key"
+ ]
}
}
}
diff --git a/spec/transforms/storage_v0_openapi_deparsed.json b/spec/transforms/storage_v0_openapi_deparsed.json
index ea6e99fba53..4a115fa1a40 100644
--- a/spec/transforms/storage_v0_openapi_deparsed.json
+++ b/spec/transforms/storage_v0_openapi_deparsed.json
@@ -1,42 +1,44 @@
{
- "swagger": "2.0",
+ "openapi": "3.0.3",
"info": {
"title": "Supabase Storage API",
"description": "API documentation for Supabase Storage",
"version": "0.0.1"
},
- "definitions": {
- "def-0": {
- "type": "object",
- "properties": {
- "authorization": {
- "type": "string"
- }
- },
- "required": [
- "authorization"
- ],
- "title": "authSchema"
- },
- "def-1": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
+ "components": {
+ "schemas": {
+ "def-0": {
+ "type": "object",
+ "properties": {
+ "authorization": {
+ "type": "string"
+ }
},
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
- }
+ "required": [
+ "authorization"
+ ],
+ "title": "authSchema"
},
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ "def-1": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
+ }
}
},
"paths": {
@@ -46,83 +48,88 @@
"tags": [
"bucket"
],
- "parameters": [
- {
- "name": "body",
- "in": "body",
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "examples": [
- "avatars"
- ]
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "id": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "public": {
+ "type": "boolean",
+ "example": false
+ }
},
- "id": {
- "type": "string",
- "examples": [
- "avatars"
- ]
- },
- "public": {
- "type": "boolean",
- "examples": [
- false
- ]
- }
- },
- "required": [
- "name"
- ]
+ "required": [
+ "name"
+ ]
+ }
}
},
+ "required": true
+ },
+ "parameters": [
{
"in": "header",
"name": "authorization",
"required": true,
- "type": "string"
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "examples": [
- "avatars"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "example": "avatars"
+ }
+ },
+ "required": [
+ "name"
]
}
- },
- "required": [
- "name"
- ]
+ }
}
},
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}
@@ -137,55 +144,65 @@
"in": "header",
"name": "authorization",
"required": true,
- "type": "string"
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "array",
- "items": {
- "$id": "bucketSchema",
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "owner": {
+ "type": "string"
+ },
+ "public": {
+ "type": "boolean"
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false,
+ "title": "bucketSchema",
+ "example": {
+ "id": "bucket2",
+ "name": "bucket2",
+ "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
+ "created_at": "2021-02-17T04:43:32.770206+00:00",
+ "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ }
},
- "name": {
- "type": "string"
- },
- "owner": {
- "type": "string"
- },
- "public": {
- "type": "boolean"
- },
- "created_at": {
- "type": "string"
- },
- "updated_at": {
- "type": "string"
- }
+ "example": [
+ {
+ "id": "bucket2",
+ "name": "bucket2",
+ "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
+ "created_at": "2021-02-17T04:43:32.770206+00:00",
+ "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ }
+ ]
},
- "required": [
- "id",
- "name"
- ],
- "additionalProperties": false,
- "examples": [
- {
- "id": "bucket2",
- "name": "bucket2",
- "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
- "created_at": "2021-02-17T04:43:32.770206+00:00",
- "updated_at": "2021-02-17T04:43:32.770206+00:00"
- }
- ],
- "title": "bucketSchema"
- },
- "examples": [
- [
+ "example": [
{
"id": "bucket2",
"name": "bucket2",
@@ -194,30 +211,34 @@
"updated_at": "2021-02-17T04:43:32.770206+00:00"
}
]
- ]
+ }
}
},
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}
@@ -231,57 +252,66 @@
],
"parameters": [
{
- "type": "string",
- "examples": [
- "avatars"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "example": "avatars",
"in": "path",
- "name": "bucketId"
+ "name": "bucketId",
+ "required": true
},
{
"in": "header",
"name": "authorization",
"required": true,
- "type": "string"
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "message": {
- "type": "string",
- "examples": [
- "Successfully emptied"
- ]
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "Successfully emptied"
+ }
+ }
}
}
}
},
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}
@@ -295,84 +325,99 @@
],
"parameters": [
{
- "type": "string",
- "examples": [
- "avatars"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "example": "avatars",
"in": "path",
- "name": "bucketId"
+ "name": "bucketId",
+ "required": true
},
{
"in": "header",
"name": "authorization",
"required": true,
- "type": "string"
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "$id": "todo.com",
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "owner": {
+ "type": "string"
+ },
+ "public": {
+ "type": "boolean"
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false,
+ "example": {
+ "id": "bucket2",
+ "name": "bucket2",
+ "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
+ "created_at": "2021-02-17T04:43:32.770206+00:00",
+ "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ }
},
- "name": {
- "type": "string"
- },
- "owner": {
- "type": "string"
- },
- "public": {
- "type": "boolean"
- },
- "created_at": {
- "type": "string"
- },
- "updated_at": {
- "type": "string"
- }
- },
- "required": [
- "id",
- "name"
- ],
- "additionalProperties": false,
- "examples": [
- {
+ "example": {
"id": "bucket2",
"name": "bucket2",
"owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
"created_at": "2021-02-17T04:43:32.770206+00:00",
"updated_at": "2021-02-17T04:43:32.770206+00:00"
}
- ]
+ }
}
},
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}
@@ -382,68 +427,76 @@
"tags": [
"bucket"
],
- "parameters": [
- {
- "name": "body",
- "in": "body",
- "schema": {
- "type": "object",
- "properties": {
- "public": {
- "type": "boolean",
- "examples": [
- false
- ]
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "public": {
+ "type": "boolean",
+ "example": false
+ }
}
}
}
- },
+ }
+ },
+ "parameters": [
{
"in": "header",
"name": "authorization",
"required": true,
- "type": "string"
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "message": {
- "type": "string",
- "examples": [
- "Successfully updated"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "Successfully updated"
+ }
+ },
+ "required": [
+ "message"
]
}
- },
- "required": [
- "message"
- ]
+ }
}
},
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}
@@ -455,57 +508,66 @@
],
"parameters": [
{
- "type": "string",
- "examples": [
- "avatars"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "example": "avatars",
"in": "path",
- "name": "bucketId"
+ "name": "bucketId",
+ "required": true
},
{
"in": "header",
"name": "authorization",
"required": true,
- "type": "string"
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "message": {
- "type": "string",
- "examples": [
- "Successfully deleted"
- ]
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "Successfully deleted"
+ }
+ }
}
}
}
},
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}
@@ -519,124 +581,142 @@
],
"parameters": [
{
- "type": "string",
- "examples": [
- "avatars"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
- "type": "string",
- "examples": [
- "folder/cat.png"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "folder/cat.png"
+ },
+ "example": "folder/cat.png",
"in": "path",
- "name": "*"
+ "name": "*",
+ "required": true
},
{
"in": "header",
"name": "authorization",
"required": true,
- "type": "string"
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "message": {
- "type": "string",
- "examples": [
- "Successfully deleted"
- ]
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "Successfully deleted"
+ }
+ }
}
}
}
},
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}
},
"get": {
"summary": "Get object (deprecated)",
- "description": "use GET /object/authenticated/{bucketName} instead",
"tags": [
"deprecated"
],
+ "description": "use GET /object/authenticated/{bucketName} instead",
"parameters": [
{
- "type": "string",
- "examples": [
- "avatars"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
- "type": "string",
- "examples": [
- "folder/cat.png"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "folder/cat.png"
+ },
+ "example": "folder/cat.png",
"in": "path",
- "name": "*"
+ "name": "*",
+ "required": true
},
{
"in": "header",
"name": "authorization",
"required": true,
- "type": "string"
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}
@@ -648,69 +728,79 @@
],
"parameters": [
{
- "type": "string",
- "examples": [
- "avatars"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
- "type": "string",
- "examples": [
- "folder/cat.png"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "folder/cat.png"
+ },
+ "example": "folder/cat.png",
"in": "path",
- "name": "*"
+ "name": "*",
+ "required": true
},
{
"in": "header",
"name": "authorization",
"required": true,
- "type": "string"
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "Key": {
- "type": "string",
- "examples": [
- "projectref/avatars/folder/cat.png"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "Key": {
+ "type": "string",
+ "example": "projectref/avatars/folder/cat.png"
+ }
+ },
+ "required": [
+ "Key"
]
}
- },
- "required": [
- "Key"
- ]
+ }
}
},
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}
@@ -722,69 +812,79 @@
],
"parameters": [
{
- "type": "string",
- "examples": [
- "avatars"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
- "type": "string",
- "examples": [
- "folder/cat.png"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "folder/cat.png"
+ },
+ "example": "folder/cat.png",
"in": "path",
- "name": "*"
+ "name": "*",
+ "required": true
},
{
"in": "header",
"name": "authorization",
"required": true,
- "type": "string"
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "Key": {
- "type": "string",
- "examples": [
- "avatars/folder/cat.png"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "Key": {
+ "type": "string",
+ "example": "avatars/folder/cat.png"
+ }
+ },
+ "required": [
+ "Key"
]
}
- },
- "required": [
- "Key"
- ]
+ }
}
},
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}
@@ -796,199 +896,205 @@
"tags": [
"object"
],
- "parameters": [
- {
- "name": "body",
- "in": "body",
- "schema": {
- "type": "object",
- "properties": {
- "prefixes": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "minItems": 1,
- "examples": [
- [
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "prefixes": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "minItems": 1,
+ "example": [
"folder/cat.png",
"folder/morecats.png"
]
- ]
- }
- },
- "required": [
- "prefixes"
- ]
+ }
+ },
+ "required": [
+ "prefixes"
+ ]
+ }
}
},
+ "required": true
+ },
+ "parameters": [
{
- "type": "string",
- "examples": [
- "avatars"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
"in": "header",
"name": "authorization",
"required": true,
- "type": "string"
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "array",
- "items": {
- "$id": "objectSchema",
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "bucket_id": {
- "type": "string"
- },
- "owner": {
- "type": "string"
- },
- "id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "updated_at": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "created_at": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "last_accessed_at": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "metadata": {
- "anyOf": [
- {
- "type": "object",
- "additionalProperties": true
- },
- {
- "type": "null"
- }
- ]
- },
- "buckets": {
- "$id": "bucketSchema",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
"type": "object",
"properties": {
- "id": {
+ "name": {
"type": "string"
},
- "name": {
+ "bucket_id": {
"type": "string"
},
"owner": {
"type": "string"
},
- "public": {
- "type": "boolean"
- },
- "created_at": {
- "type": "string"
+ "id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"updated_at": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "created_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "last_accessed_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "metadata": {
+ "anyOf": [
+ {
+ "type": "object",
+ "additionalProperties": true
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "buckets": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "owner": {
+ "type": "string"
+ },
+ "public": {
+ "type": "boolean"
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false,
+ "example": {
+ "id": "bucket2",
+ "name": "bucket2",
+ "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
+ "created_at": "2021-02-17T04:43:32.770206+00:00",
+ "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ }
}
},
"required": [
- "id",
"name"
],
"additionalProperties": false,
- "examples": [
- {
- "id": "bucket2",
- "name": "bucket2",
- "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
- "created_at": "2021-02-17T04:43:32.770206+00:00",
- "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ "title": "objectSchema",
+ "example": {
+ "name": "folder/cat.png",
+ "bucket_id": "avatars",
+ "owner": "317eadce-631a-4429-a0bb-f19a7a517b4a",
+ "id": "eaa8bdb5-2e00-4767-b5a9-d2502efe2196",
+ "updated_at": "2021-04-06T16:30:35.394674+00:00",
+ "created_at": "2021-04-06T16:30:35.394674+00:00",
+ "last_accessed_at": "2021-04-06T16:30:35.394674+00:00",
+ "metadata": {
+ "size": 1234
}
- ]
- }
- },
- "required": [
- "name"
- ],
- "additionalProperties": false,
- "examples": [
- {
- "name": "folder/cat.png",
- "bucket_id": "avatars",
- "owner": "317eadce-631a-4429-a0bb-f19a7a517b4a",
- "id": "eaa8bdb5-2e00-4767-b5a9-d2502efe2196",
- "updated_at": "2021-04-06T16:30:35.394674+00:00",
- "created_at": "2021-04-06T16:30:35.394674+00:00",
- "last_accessed_at": "2021-04-06T16:30:35.394674+00:00",
- "metadata": {
- "size": 1234
}
}
- ],
- "title": "objectSchema"
+ }
}
}
},
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}
@@ -1002,52 +1108,60 @@
],
"parameters": [
{
- "type": "string",
- "examples": [
- "avatars"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
- "type": "string",
- "examples": [
- "folder/cat.png"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "folder/cat.png"
+ },
+ "example": "folder/cat.png",
"in": "path",
- "name": "*"
+ "name": "*",
+ "required": true
},
{
"in": "header",
"name": "authorization",
"required": true,
- "type": "string"
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}
@@ -1059,90 +1173,101 @@
"tags": [
"object"
],
- "parameters": [
- {
- "name": "body",
- "in": "body",
- "schema": {
- "type": "object",
- "properties": {
- "expiresIn": {
- "type": "integer",
- "minimum": 1,
- "examples": [
- 60000
- ]
- }
- },
- "required": [
- "expiresIn"
- ]
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "expiresIn": {
+ "type": "integer",
+ "minimum": 1,
+ "example": 60000
+ }
+ },
+ "required": [
+ "expiresIn"
+ ]
+ }
}
},
+ "required": true
+ },
+ "parameters": [
{
- "type": "string",
- "examples": [
- "avatars"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
- "type": "string",
- "examples": [
- "folder/cat.png"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "folder/cat.png"
+ },
+ "example": "folder/cat.png",
"in": "path",
- "name": "*"
+ "name": "*",
+ "required": true
},
{
"in": "header",
"name": "authorization",
"required": true,
- "type": "string"
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "signedURL": {
- "type": "string",
- "examples": [
- "/object/sign/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "signedURL": {
+ "type": "string",
+ "example": "/object/sign/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
+ }
+ },
+ "required": [
+ "signedURL"
]
}
- },
- "required": [
- "signedURL"
- ]
+ }
}
},
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}
@@ -1154,55 +1279,62 @@
],
"parameters": [
{
- "type": "string",
- "examples": [
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJidWNrZXQyL3B1YmxpYy9zYWRjYXQtdXBsb2FkMjMucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.uBQcXzuvXxfw-9WgzWMBfE_nR3VOgpvfZe032sfLSSk"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJidWNrZXQyL3B1YmxpYy9zYWRjYXQtdXBsb2FkMjMucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.uBQcXzuvXxfw-9WgzWMBfE_nR3VOgpvfZe032sfLSSk"
+ },
+ "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJidWNrZXQyL3B1YmxpYy9zYWRjYXQtdXBsb2FkMjMucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.uBQcXzuvXxfw-9WgzWMBfE_nR3VOgpvfZe032sfLSSk",
"in": "query",
- "name": "token"
+ "name": "token",
+ "required": true
},
{
- "type": "string",
- "examples": [
- "avatars"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
- "type": "string",
- "examples": [
- "folder/cat.png"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "folder/cat.png"
+ },
+ "example": "folder/cat.png",
"in": "path",
- "name": "*"
+ "name": "*",
+ "required": true
}
],
"responses": {
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}
@@ -1214,118 +1346,122 @@
"tags": [
"object"
],
- "parameters": [
- {
- "name": "body",
- "in": "body",
- "schema": {
- "type": "object",
- "properties": {
- "expiresIn": {
- "type": "integer",
- "minimum": 1,
- "examples": [
- 60000
- ]
- },
- "paths": {
- "type": "array",
- "items": {
- "type": "string"
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "expiresIn": {
+ "type": "integer",
+ "minimum": 1,
+ "example": 60000
},
- "minItems": 1,
- "examples": [
- [
+ "paths": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "minItems": 1,
+ "example": [
"folder/cat.png",
"folder/morecats.png"
]
- ]
- }
- },
- "required": [
- "expiresIn",
- "paths"
- ]
+ }
+ },
+ "required": [
+ "expiresIn",
+ "paths"
+ ]
+ }
}
},
+ "required": true
+ },
+ "parameters": [
{
- "type": "string",
- "examples": [
- "avatars"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
"in": "header",
"name": "authorization",
"required": true,
- "type": "string"
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "error": {
- "error": [
- "string",
- "null"
- ],
- "examples": [
- "Either the object does not exist or you do not have access to it"
- ]
- },
- "path": {
- "type": "string",
- "examples": [
- "folder/cat.png"
- ]
- },
- "signedURL": {
- "type": [
- "string",
- "null"
- ],
- "examples": [
- "/object/sign/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "error": [
+ "string",
+ "null"
+ ],
+ "example": "Either the object does not exist or you do not have access to it"
+ },
+ "path": {
+ "type": "string",
+ "example": "folder/cat.png"
+ },
+ "signedURL": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "example": "/object/sign/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
+ }
+ },
+ "required": [
+ "error",
+ "path",
+ "signedURL"
]
}
- },
- "required": [
- "error",
- "path",
- "signedURL"
- ]
+ }
}
}
},
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}
@@ -1337,85 +1473,90 @@
"tags": [
"object"
],
- "parameters": [
- {
- "name": "body",
- "in": "body",
- "schema": {
- "type": "object",
- "properties": {
- "bucketId": {
- "type": "string",
- "examples": [
- "avatars"
- ]
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "bucketId": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "sourceKey": {
+ "type": "string",
+ "example": "folder/cat.png"
+ },
+ "destinationKey": {
+ "type": "string",
+ "example": "folder/newcat.png"
+ }
},
- "sourceKey": {
- "type": "string",
- "examples": [
- "folder/cat.png"
- ]
- },
- "destinationKey": {
- "type": "string",
- "examples": [
- "folder/newcat.png"
- ]
- }
- },
- "required": [
- "bucketId",
- "sourceKey",
- "destinationKey"
- ]
+ "required": [
+ "bucketId",
+ "sourceKey",
+ "destinationKey"
+ ]
+ }
}
},
+ "required": true
+ },
+ "parameters": [
{
"in": "header",
"name": "authorization",
"required": true,
- "type": "string"
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "message": {
- "type": "string",
- "examples": [
- "Successfully moved"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "Successfully moved"
+ }
+ },
+ "required": [
+ "message"
]
}
- },
- "required": [
- "message"
- ]
+ }
}
},
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}
@@ -1427,229 +1568,232 @@
"tags": [
"object"
],
- "parameters": [
- {
- "name": "body",
- "in": "body",
- "schema": {
- "type": "object",
- "properties": {
- "prefix": {
- "type": "string",
- "examples": [
- "folder/subfolder"
- ]
- },
- "limit": {
- "type": "integer",
- "minimum": 1,
- "examples": [
- 10
- ]
- },
- "offset": {
- "type": "integer",
- "minimum": 0,
- "examples": [
- 0
- ]
- },
- "sortBy": {
- "type": "object",
- "properties": {
- "column": {
- "type": "string",
- "enum": [
- "name",
- "updated_at",
- "created_at",
- "last_accessed_at"
- ]
- },
- "order": {
- "type": "string",
- "enum": [
- "asc",
- "desc"
- ]
- }
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "prefix": {
+ "type": "string",
+ "example": "folder/subfolder"
},
- "required": [
- "column"
- ]
+ "limit": {
+ "type": "integer",
+ "minimum": 1,
+ "example": 10
+ },
+ "offset": {
+ "type": "integer",
+ "minimum": 0,
+ "example": 0
+ },
+ "sortBy": {
+ "type": "object",
+ "properties": {
+ "column": {
+ "type": "string",
+ "enum": [
+ "name",
+ "updated_at",
+ "created_at",
+ "last_accessed_at"
+ ]
+ },
+ "order": {
+ "type": "string",
+ "enum": [
+ "asc",
+ "desc"
+ ]
+ }
+ },
+ "required": [
+ "column"
+ ]
+ },
+ "search": {
+ "type": "string"
+ }
},
- "search": {
- "type": "string"
- }
- },
- "required": [
- "prefix"
- ]
+ "required": [
+ "prefix"
+ ]
+ }
}
},
+ "required": true
+ },
+ "parameters": [
{
- "type": "string",
- "required": true,
+ "schema": {
+ "type": "string"
+ },
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
"in": "header",
"name": "authorization",
"required": true,
- "type": "string"
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "array",
- "items": {
- "$id": "objectSchema",
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "bucket_id": {
- "type": "string"
- },
- "owner": {
- "type": "string"
- },
- "id": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "updated_at": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "created_at": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "last_accessed_at": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ]
- },
- "metadata": {
- "anyOf": [
- {
- "type": "object",
- "additionalProperties": true
- },
- {
- "type": "null"
- }
- ]
- },
- "buckets": {
- "$id": "bucketSchema",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
"type": "object",
"properties": {
- "id": {
+ "name": {
"type": "string"
},
- "name": {
+ "bucket_id": {
"type": "string"
},
"owner": {
"type": "string"
},
- "public": {
- "type": "boolean"
- },
- "created_at": {
- "type": "string"
+ "id": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
},
"updated_at": {
- "type": "string"
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "created_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "last_accessed_at": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "metadata": {
+ "anyOf": [
+ {
+ "type": "object",
+ "additionalProperties": true
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "buckets": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "owner": {
+ "type": "string"
+ },
+ "public": {
+ "type": "boolean"
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false,
+ "example": {
+ "id": "bucket2",
+ "name": "bucket2",
+ "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
+ "created_at": "2021-02-17T04:43:32.770206+00:00",
+ "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ }
}
},
"required": [
- "id",
"name"
],
"additionalProperties": false,
- "examples": [
- {
- "id": "bucket2",
- "name": "bucket2",
- "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
- "created_at": "2021-02-17T04:43:32.770206+00:00",
- "updated_at": "2021-02-17T04:43:32.770206+00:00"
+ "example": {
+ "name": "folder/cat.png",
+ "bucket_id": "avatars",
+ "owner": "317eadce-631a-4429-a0bb-f19a7a517b4a",
+ "id": "eaa8bdb5-2e00-4767-b5a9-d2502efe2196",
+ "updated_at": "2021-04-06T16:30:35.394674+00:00",
+ "created_at": "2021-04-06T16:30:35.394674+00:00",
+ "last_accessed_at": "2021-04-06T16:30:35.394674+00:00",
+ "metadata": {
+ "size": 1234
}
- ]
- }
- },
- "required": [
- "name"
- ],
- "additionalProperties": false,
- "examples": [
- {
- "name": "folder/cat.png",
- "bucket_id": "avatars",
- "owner": "317eadce-631a-4429-a0bb-f19a7a517b4a",
- "id": "eaa8bdb5-2e00-4767-b5a9-d2502efe2196",
- "updated_at": "2021-04-06T16:30:35.394674+00:00",
- "created_at": "2021-04-06T16:30:35.394674+00:00",
- "last_accessed_at": "2021-04-06T16:30:35.394674+00:00",
- "metadata": {
- "size": 1234
}
}
- ]
+ }
}
}
},
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}
@@ -1661,85 +1805,90 @@
"tags": [
"object"
],
- "parameters": [
- {
- "name": "body",
- "in": "body",
- "schema": {
- "type": "object",
- "properties": {
- "sourceKey": {
- "type": "string",
- "examples": [
- "folder/source.png"
- ]
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "sourceKey": {
+ "type": "string",
+ "example": "folder/source.png"
+ },
+ "bucketId": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "destinationKey": {
+ "type": "string",
+ "example": "folder/destination.png"
+ }
},
- "bucketId": {
- "type": "string",
- "examples": [
- "avatars"
- ]
- },
- "destinationKey": {
- "type": "string",
- "examples": [
- "folder/destination.png"
- ]
- }
- },
- "required": [
- "sourceKey",
- "bucketId",
- "destinationKey"
- ]
+ "required": [
+ "sourceKey",
+ "bucketId",
+ "destinationKey"
+ ]
+ }
}
},
+ "required": true
+ },
+ "parameters": [
{
"in": "header",
"name": "authorization",
"required": true,
- "type": "string"
+ "schema": {
+ "type": "string"
+ }
}
],
"responses": {
"200": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "Key": {
- "type": "string",
- "examples": [
- "folder/destination.png"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "Key": {
+ "type": "string",
+ "example": "folder/destination.png"
+ }
+ },
+ "required": [
+ "Key"
]
}
- },
- "required": [
- "Key"
- ]
+ }
}
},
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}
@@ -1753,46 +1902,52 @@
],
"parameters": [
{
- "type": "string",
- "examples": [
- "avatars"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "avatars"
+ },
+ "example": "avatars",
"in": "path",
- "name": "bucketName"
+ "name": "bucketName",
+ "required": true
},
{
- "type": "string",
- "examples": [
- "folder/cat.png"
- ],
- "required": true,
+ "schema": {
+ "type": "string",
+ "example": "folder/cat.png"
+ },
+ "example": "folder/cat.png",
"in": "path",
- "name": "*"
+ "name": "*",
+ "required": true
}
],
"responses": {
- "400": {
+ "4XX": {
"description": "Default Response",
- "schema": {
- "type": "object",
- "properties": {
- "statusCode": {
- "type": "string"
- },
- "error": {
- "type": "string"
- },
- "message": {
- "type": "string"
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "statusCode": {
+ "type": "string"
+ },
+ "error": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "statusCode",
+ "error",
+ "message"
+ ],
+ "title": "errorSchema"
}
- },
- "required": [
- "statusCode",
- "error",
- "message"
- ],
- "title": "errorSchema"
+ }
}
}
}