-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for problem details (#20)
* Add support for problem details responses * Prevent redaction of api-supported-versions header * Bump minimum target frameworks and packages * Improve script for client generation
- Loading branch information
1 parent
f2449d2
commit 3990835
Showing
37 changed files
with
1,646 additions
and
818 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,33 @@ | ||
Push-Location $PSScriptRoot | ||
$settings = Get-Content -Raw -Path "config.json" | ConvertFrom-Json | ||
cd .. | ||
$location = Get-Location | ||
#Requires -Version 7.4 | ||
<# | ||
.SYNOPSIS | ||
Generates the REST client locally | ||
.DESCRIPTION | ||
This script generates the REST client locally. | ||
#> | ||
[CmdletBinding()] | ||
param() | ||
|
||
$PSNativeCommandUseErrorActionPreference = $true | ||
$ErrorActionPreference = 'Stop' | ||
|
||
# Update the version in the csproj when changing this | ||
$autoRestCSharpVersion = "3.0.0-beta.20240527.2" | ||
|
||
$settings = Get-Content -Raw -Path "$PSScriptRoot/config.json" | ConvertFrom-Json | ||
$tag = $settings.tag | ||
$spec = $settings.spec | ||
|
||
autorest ..\eryph-api-spec\specification\$spec --tag=$tag --csharp-src-folder=$location --v3 --csharp --verbose | ||
npm exec --package="autorest@3.7.1" -- ` | ||
autorest ` | ||
--version="3.10.2" ` | ||
--use="@autorest/csharp@$autoRestCSharpVersion" ` | ||
--use="@autorest/modelerfour@4.27.0" ` | ||
"$PSScriptRoot/../../eryph-api-spec/specification/$spec" ` | ||
--tag=$tag ` | ||
--csharp-src-folder="$PSScriptRoot/.." ` | ||
--v3 ` | ||
--csharp ` | ||
--skip-csproj=true ` | ||
--generate-sample-project=false ` | ||
--verbose |
7 changes: 4 additions & 3 deletions
7
src/Eryph.IdentityClient.Commands/Eryph.IdentityClient.Commands.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/Eryph.IdentityClient.Commands/Properties/launchSettings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"profiles": { | ||
"Eryph.IdentityClient.Commands": { | ||
"commandName": "Project" | ||
}, | ||
"Run in Powershell": { | ||
"commandName": "Executable", | ||
"executablePath": "powershell.exe", | ||
"commandLineArgs": "-NoProfile -NoExit -Command \"Import-Module $(TargetPath)\"" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#if NET461 | ||
#if NET462 | ||
|
||
using System; | ||
using System.IO; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.