Skip to content

Commit 0d1f040

Browse files
authored
chore: bump openapi spec for function deploy (#3116)
1 parent a268e7b commit 0d1f040

File tree

3 files changed

+566
-96
lines changed

3 files changed

+566
-96
lines changed

api/beta.yaml

Lines changed: 135 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2220,6 +2220,34 @@ paths:
22202220
- Database
22212221
security:
22222222
- bearer: []
2223+
/v1/projects/{ref}/database/context:
2224+
get:
2225+
operationId: getDatabaseMetadata
2226+
summary: Gets database metadata for the given project.
2227+
description: >-
2228+
This is an **experimental** endpoint. It is subject to change or removal
2229+
in future versions. Use it with caution, as it may not remain supported
2230+
or stable.
2231+
deprecated: true
2232+
parameters:
2233+
- name: ref
2234+
required: true
2235+
in: path
2236+
schema:
2237+
type: string
2238+
responses:
2239+
'200':
2240+
description: ''
2241+
content:
2242+
application/json:
2243+
schema:
2244+
$ref: '#/components/schemas/GetProjectDbMetadataResponseDto'
2245+
'403':
2246+
description: ''
2247+
tags:
2248+
- Database
2249+
security:
2250+
- bearer: []
22232251
/v1/projects/{ref}/functions:
22242252
get:
22252253
operationId: v1-list-all-functions
@@ -2326,6 +2354,49 @@ paths:
23262354
- Edge Functions
23272355
security:
23282356
- bearer: []
2357+
/v1/projects/{ref}/functions/deploy:
2358+
post:
2359+
operationId: v1-deploy-a-function
2360+
summary: Deploy a function
2361+
description: >-
2362+
A new endpoint to deploy functions. It will create if function does not
2363+
exist.
2364+
parameters:
2365+
- name: ref
2366+
required: true
2367+
in: path
2368+
description: Project ref
2369+
schema:
2370+
minLength: 20
2371+
maxLength: 20
2372+
type: string
2373+
- name: slug
2374+
required: false
2375+
in: query
2376+
schema:
2377+
pattern: /^[A-Za-z0-9_-]+$/
2378+
type: string
2379+
requestBody:
2380+
required: true
2381+
content:
2382+
multipart/form-data:
2383+
schema:
2384+
$ref: '#/components/schemas/FunctionDeployBody'
2385+
responses:
2386+
'201':
2387+
description: ''
2388+
content:
2389+
application/json:
2390+
schema:
2391+
$ref: '#/components/schemas/FunctionResponse'
2392+
'403':
2393+
description: ''
2394+
'500':
2395+
description: Failed to deploy function
2396+
tags:
2397+
- Edge Functions
2398+
security:
2399+
- bearer: []
23292400
/v1/projects/{ref}/functions/{function_slug}:
23302401
get:
23312402
operationId: v1-get-a-function
@@ -3111,30 +3182,15 @@ components:
31113182
description: Template URL used to create the project from the CLI.
31123183
example: >-
31133184
https://github.com/supabase/supabase/tree/master/examples/slack-clone/nextjs-slack-clone
3114-
release_channel:
3115-
type: string
3116-
enum:
3117-
- internal
3118-
- alpha
3119-
- beta
3120-
- ga
3121-
- withdrawn
3122-
- preview
3123-
description: Release channel. If not provided, GA will be used.
3124-
postgres_engine:
3125-
type: string
3126-
enum:
3127-
- '15'
3128-
- 17-oriole
3129-
description: >-
3130-
Postgres engine version. If not provided, the latest version will be
3131-
used.
31323185
required:
31333186
- db_pass
31343187
- name
31353188
- organization_id
31363189
- region
31373190
additionalProperties: false
3191+
hideDefinitions:
3192+
- release_channel
3193+
- postgres_engine
31383194
V1ProjectResponse:
31393195
type: object
31403196
properties:
@@ -5469,6 +5525,7 @@ components:
54695525
- '13'
54705526
- '14'
54715527
- '15'
5528+
- '17'
54725529
- 17-oriole
54735530
required:
54745531
- version
@@ -5485,27 +5542,10 @@ components:
54855542
- available_versions
54865543
RestoreProjectBodyDto:
54875544
type: object
5488-
properties:
5489-
release_channel:
5490-
type: string
5491-
enum:
5492-
- internal
5493-
- alpha
5494-
- beta
5495-
- ga
5496-
- withdrawn
5497-
- preview
5498-
description: >-
5499-
Release channel version. If not provided, GeneralAvailability will
5500-
be used.
5501-
postgres_engine:
5502-
type: string
5503-
enum:
5504-
- '15'
5505-
- 17-oriole
5506-
description: >-
5507-
Postgres engine version. If not provided, the latest version from
5508-
the given release channel will be used.
5545+
properties: {}
5546+
hideDefinitions:
5547+
- release_channel
5548+
- postgres_engine
55095549
V1AnalyticsResponse:
55105550
type: object
55115551
properties:
@@ -5544,6 +5584,32 @@ components:
55445584
type: string
55455585
required:
55465586
- query
5587+
GetProjectDbMetadataResponseDto:
5588+
type: object
5589+
properties:
5590+
databases:
5591+
type: array
5592+
items:
5593+
type: object
5594+
properties:
5595+
name:
5596+
type: string
5597+
schemas:
5598+
type: array
5599+
items:
5600+
type: object
5601+
properties:
5602+
name:
5603+
type: string
5604+
required:
5605+
- name
5606+
additionalProperties: true
5607+
required:
5608+
- name
5609+
- schemas
5610+
additionalProperties: true
5611+
required:
5612+
- databases
55475613
FunctionResponse:
55485614
type: object
55495615
properties:
@@ -5605,6 +5671,36 @@ components:
56055671
- slug
56065672
- name
56075673
- body
5674+
FunctionMetadata:
5675+
type: object
5676+
properties:
5677+
entrypoint_path:
5678+
type: string
5679+
import_map_path:
5680+
type: string
5681+
static_patterns:
5682+
type: array
5683+
items:
5684+
type: string
5685+
verify_jwt:
5686+
type: boolean
5687+
name:
5688+
type: string
5689+
required:
5690+
- entrypoint_path
5691+
FunctionDeployBody:
5692+
type: object
5693+
properties:
5694+
file:
5695+
type: array
5696+
items:
5697+
type: string
5698+
format: binary
5699+
metadata:
5700+
$ref: '#/components/schemas/FunctionMetadata'
5701+
required:
5702+
- file
5703+
- metadata
56085704
FunctionSlugResponse:
56095705
type: object
56105706
properties:

0 commit comments

Comments
 (0)