mirror of
https://github.com/bitwarden/server
synced 2025-12-10 05:13:48 +00:00
Update Swashbuckle and improve generated OpenAPI files (#6066)
* Improve generated OpenAPI files * Nullable * Fmt * Correct powershell command * Fix name * Add some tests * Fmt * Switch to using json naming policy
This commit is contained in:
19
dev/generate_openapi_files.ps1
Normal file
19
dev/generate_openapi_files.ps1
Normal file
@@ -0,0 +1,19 @@
|
||||
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"
|
||||
|
||||
# Api internal & public
|
||||
Set-Location "../../src/Api"
|
||||
dotnet build
|
||||
dotnet swagger tofile --output "../../api.json" --host "https://api.bitwarden.com" "./bin/Debug/net8.0/Api.dll" "internal"
|
||||
dotnet swagger tofile --output "../../api.public.json" --host "https://api.bitwarden.com" "./bin/Debug/net8.0/Api.dll" "public"
|
||||
Reference in New Issue
Block a user