mirror of
https://github.com/bitwarden/server
synced 2025-12-06 00:03:34 +00:00
- in generated JSON (used in help center), only show cloud options (with corrected identity URL) - in self-host and dev, only show local option
29 lines
829 B
PowerShell
29 lines
829 B
PowerShell
Set-Location "$PSScriptRoot/.."
|
|
|
|
$env:ASPNETCORE_ENVIRONMENT = "Development"
|
|
$env:swaggerGen = "True"
|
|
$env:DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX = "2"
|
|
$env:GLOBALSETTINGS__SQLSERVER__CONNECTIONSTRING = "placeholder"
|
|
|
|
dotnet tool restore
|
|
|
|
# Identity
|
|
Set-Location "./src/Identity"
|
|
dotnet build
|
|
dotnet swagger tofile --output "../../identity.json" --host "https://identity.bitwarden.com" "./bin/Debug/net8.0/Identity.dll" "v1"
|
|
if ($LASTEXITCODE -ne 0) {
|
|
exit $LASTEXITCODE
|
|
}
|
|
|
|
# Api internal & public
|
|
Set-Location "../../src/Api"
|
|
dotnet build
|
|
dotnet swagger tofile --output "../../api.json" "./bin/Debug/net8.0/Api.dll" "internal"
|
|
if ($LASTEXITCODE -ne 0) {
|
|
exit $LASTEXITCODE
|
|
}
|
|
dotnet swagger tofile --output "../../api.public.json" "./bin/Debug/net8.0/Api.dll" "public"
|
|
if ($LASTEXITCODE -ne 0) {
|
|
exit $LASTEXITCODE
|
|
}
|