Skip to content

Commit ef2b35d

Browse files
Specify file location in body (Azure#26515)
1 parent 88fe50a commit ef2b35d

File tree

6 files changed

+113
-37
lines changed

6 files changed

+113
-37
lines changed

eng/Packages.Data.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266
</ItemGroup>
267267

268268
<PropertyGroup>
269-
<TestProxyVersion>1.0.0-dev.20220107.1</TestProxyVersion>
269+
<TestProxyVersion>1.0.0-dev.20220119.2</TestProxyVersion>
270270
</PropertyGroup>
271271

272272
</Project>

sdk/core/Azure.Core.TestFramework/src/Generated/Models/StartInformation.Serialization.cs

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/core/Azure.Core.TestFramework/src/Generated/Models/StartInformation.cs

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/core/Azure.Core.TestFramework/src/Generated/TestProxyRestClient.cs

Lines changed: 34 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/core/Azure.Core.TestFramework/src/TestRecording.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ internal async Task InitializeProxySettingsAsync()
8383
switch (Mode)
8484
{
8585
case RecordedTestMode.Record:
86-
var recordResponse = await _proxy.Client.StartRecordAsync(_sessionFile);
86+
var recordResponse = await _proxy.Client.StartRecordAsync(new StartInformation(_sessionFile));
8787
RecordingId = recordResponse.Headers.XRecordingId;
8888
await AddProxySanitizersAsync();
8989

@@ -92,7 +92,7 @@ internal async Task InitializeProxySettingsAsync()
9292
ResponseWithHeaders<IReadOnlyDictionary<string, string>, TestProxyStartPlaybackHeaders> playbackResponse = null;
9393
try
9494
{
95-
playbackResponse = await _proxy.Client.StartPlaybackAsync(_sessionFile);
95+
playbackResponse = await _proxy.Client.StartPlaybackAsync(new StartInformation(_sessionFile));
9696
}
9797
catch (RequestFailedException ex)
9898
when (ex.Status == 404)

sdk/core/Azure.Core.TestFramework/src/testproxy.json

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
],
2020
"parameters": [
2121
{
22-
"name": "x-recording-file",
23-
"in": "header",
22+
"name": "body",
23+
"in": "body",
2424
"description": "File location of the recording.",
2525
"required": true,
26-
"type": "string"
26+
"schema": {
27+
"$ref": "#/definitions/StartInformation"
28+
}
2729
}
2830
],
2931
"responses": {
@@ -96,11 +98,13 @@
9698
],
9799
"parameters": [
98100
{
99-
"name": "x-recording-file",
100-
"in": "header",
101+
"name": "body",
102+
"in": "body",
101103
"description": "File location of the recording.",
102104
"required": true,
103-
"type": "string"
105+
"schema": {
106+
"$ref": "#/definitions/StartInformation"
107+
}
104108
}
105109
],
106110
"responses": {
@@ -717,6 +721,18 @@
717721
"type": "string"
718722
}
719723
}
724+
},
725+
"StartInformation": {
726+
"type": "object",
727+
"description": "Start object to be specified when starting playback or record",
728+
"properties": {
729+
"x-recording-file": {
730+
"type": "string"
731+
}
732+
},
733+
"required": [
734+
"x-recording-file"
735+
]
720736
}
721737
}
722738
}

0 commit comments

Comments
 (0)