Skip to content

Commit

Permalink
Create tsp, migrate test-proxy swagger to tsp (#9451)
Browse files Browse the repository at this point in the history
* update the statuscode in the error http response body to be int, not string
* migrate the existing test-proxy swagger to an up-to-date typespec
  • Loading branch information
scbedd authored Dec 4, 2024
1 parent 1fcabcc commit b806708
Show file tree
Hide file tree
Showing 8 changed files with 1,536 additions and 474 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public async Task Invoke(HttpContext context)
var bodyObj = new
{
Message = e.Message,
Status = e.StatusCode.ToString()
Status = e.StatusCode
};

DebugLogger.LogError(e.Message);
Expand All @@ -85,7 +85,7 @@ public async Task Invoke(HttpContext context)
var bodyObj = new
{
Message = e.Message,
Status = unexpectedStatusCode.ToString(),
Status = unexpectedStatusCode,
StackTrace = e.StackTrace,
};

Expand Down
13 changes: 13 additions & 0 deletions tools/test-proxy/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,16 @@ extends:
- pwsh: |
#vso[task.setvariable variable=COMPlus_Pkcs12UnspecifiedPasswordIterationLimit]-1
displayName: Override Acceptable Password Iteration Count
TestPostSteps:
- task: NodeTool@0
inputs:
versionSpec: 20.x
displayName: "Use Node 20"
- pwsh: |
npm install -g @typespec/compiler
displayName: Install typespec and tooling
- pwsh: |
npm ci
tsp compile .
displayName: TSP Compile
workingDirectory: tools/test-proxy/typespec
Loading

0 comments on commit b806708

Please sign in to comment.