Initial commit of akmon project
This commit is contained in:
21
scripts/fetch-supabase-openapi.ps1
Normal file
21
scripts/fetch-supabase-openapi.ps1
Normal file
@@ -0,0 +1,21 @@
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$ServiceRoleKey,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]$OutputPath = "${PWD}/.github/copilot/supabase-rest-openapi.json",
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]$RestUrl = "http://192.168.0.150:8080/rest/v1"
|
||||
)
|
||||
|
||||
$uri = "$RestUrl/?apikey=$ServiceRoleKey"
|
||||
Write-Host "Downloading Supabase OpenAPI schema from $uri" -ForegroundColor Cyan
|
||||
|
||||
try {
|
||||
Invoke-WebRequest -Uri $uri -OutFile $OutputPath -UseBasicParsing
|
||||
Write-Host "Saved OpenAPI schema to $OutputPath" -ForegroundColor Green
|
||||
} catch {
|
||||
Write-Host "Failed to download OpenAPI schema: $($_.Exception.Message)" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
Reference in New Issue
Block a user