Add encode bytes coverage (#4174)
Fixes https://github.com/microsoft/typespec/issues/3971
This commit is contained in:
Родитель
9dfdac7d38
Коммит
cea699f73b
|
@ -16,7 +16,7 @@ if ($null -eq $filter -or $filter -eq "Unbranded-TypeSpec") {
|
|||
$testProjectsLocalDir = Join-Path $packageRoot 'generator' 'TestProjects' 'Local'
|
||||
|
||||
$unbrandedTypespecTestProject = Join-Path $testProjectsLocalDir "Unbranded-TypeSpec"
|
||||
$unbrandedTypespecTestProject = $unbrandedTypespecTestProject.Replace("\", "/") # replace \ with / for the path to avoid path-unix-style warning
|
||||
$unbrandedTypespecTestProject = $unbrandedTypespecTestProject
|
||||
|
||||
Invoke (Get-TspCommand "$unbrandedTypespecTestProject/Unbranded-TypeSpec.tsp" $unbrandedTypespecTestProject)
|
||||
|
||||
|
@ -48,9 +48,9 @@ function IsSpecDir {
|
|||
$failingSpecs = @(
|
||||
Join-Path 'http' 'special-words'
|
||||
Join-Path 'http' 'client' 'structure' 'default'
|
||||
Join-Path 'http' 'client' 'structure' 'client-operation-group'
|
||||
Join-Path 'http' 'client' 'structure' 'renamed-operation'
|
||||
Join-Path 'http' 'client' 'structure' 'two-operation-group'
|
||||
Join-Path 'http' 'encode' 'bytes'
|
||||
Join-Path 'http' 'encode' 'datetime'
|
||||
Join-Path 'http' 'encode' 'duration'
|
||||
Join-Path 'http' 'parameters' 'basic'
|
||||
|
|
|
@ -195,13 +195,33 @@ namespace Microsoft.Generator.CSharp.ClientModel.Providers
|
|||
if (inputParameter.Location != RequestLocation.Header)
|
||||
continue;
|
||||
|
||||
bool isString;
|
||||
CSharpType? type;
|
||||
string? format;
|
||||
ValueExpression valueExpression;
|
||||
GetParamInfo(paramMap, inputParameter, out isString, out format, out valueExpression);
|
||||
GetParamInfo(paramMap, inputParameter, out type, out format, out valueExpression);
|
||||
ValueExpression[] toStringParams = format is null ? [] : [Literal(format)];
|
||||
valueExpression = isString ? valueExpression : valueExpression.Invoke(nameof(ToString), toStringParams);
|
||||
statements.Add(request.SetHeaderValue(inputParameter.NameInRequest, valueExpression.As<string>()));
|
||||
ValueExpression toStringExpression = type?.Equals(typeof(string)) == true ? valueExpression : valueExpression.Invoke(nameof(ToString), toStringParams);
|
||||
MethodBodyStatement statement;
|
||||
if (type?.Equals(typeof(BinaryData)) == true)
|
||||
{
|
||||
statement = request.SetHeaderValue(
|
||||
inputParameter.NameInRequest,
|
||||
TypeFormattersSnippets.ToString(valueExpression.Invoke("ToArray"), Literal(format)));
|
||||
}
|
||||
else if (type?.Equals(typeof(IList<BinaryData>)) == true)
|
||||
{
|
||||
statement =
|
||||
new ForeachStatement("item", valueExpression.As<IEnumerable<BinaryData>>(), out var item)
|
||||
{
|
||||
request.AddHeaderValue(inputParameter.NameInRequest, TypeFormattersSnippets.ToString(item.Invoke("ToArray"),
|
||||
Literal(format)))
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
statement = request.SetHeaderValue(inputParameter.NameInRequest, toStringExpression.As<string>());
|
||||
}
|
||||
statements.Add(statement);
|
||||
}
|
||||
|
||||
return statements;
|
||||
|
@ -216,13 +236,28 @@ namespace Microsoft.Generator.CSharp.ClientModel.Providers
|
|||
if (inputParameter.Location != RequestLocation.Query)
|
||||
continue;
|
||||
|
||||
bool isString;
|
||||
string? format;
|
||||
ValueExpression valueExpression;
|
||||
GetParamInfo(paramMap, inputParameter, out isString, out format, out valueExpression);
|
||||
GetParamInfo(paramMap, inputParameter, out var type, out format, out valueExpression);
|
||||
ValueExpression[] toStringParams = format is null ? [] : [Literal(format)];
|
||||
var toStringExpression = isString ? valueExpression : valueExpression.Invoke(nameof(ToString), toStringParams);
|
||||
var statement = uri.AppendQuery(Literal(inputParameter.NameInRequest), toStringExpression, true).Terminate();
|
||||
var toStringExpression = type?.Equals(typeof(string)) == true ? valueExpression : valueExpression.Invoke(nameof(ToString), toStringParams);
|
||||
MethodBodyStatement statement;
|
||||
if (type?.Equals(typeof(BinaryData)) == true)
|
||||
{
|
||||
statement = uri.AppendQuery(Literal(inputParameter.NameInRequest),
|
||||
valueExpression.Invoke("ToArray"), format, true).Terminate();
|
||||
}
|
||||
else if (type?.Equals(typeof(IList<BinaryData>)) == true)
|
||||
{
|
||||
statement = uri.AppendQueryDelimited(Literal(inputParameter.NameInRequest),
|
||||
valueExpression, format, true).Terminate();
|
||||
}
|
||||
else
|
||||
{
|
||||
statement = uri.AppendQuery(Literal(inputParameter.NameInRequest), toStringExpression, true)
|
||||
.Terminate();
|
||||
}
|
||||
|
||||
statement = inputParameter.IsRequired
|
||||
? statement
|
||||
: new IfStatement(valueExpression.NotEqual(Null))
|
||||
|
@ -272,12 +307,12 @@ namespace Microsoft.Generator.CSharp.ClientModel.Providers
|
|||
|
||||
if (inputParam.Location == RequestLocation.Path || inputParam.Location == RequestLocation.Uri)
|
||||
{
|
||||
bool isString;
|
||||
CSharpType? type;
|
||||
string? format;
|
||||
ValueExpression valueExpression;
|
||||
GetParamInfo(paramMap, inputParam, out isString, out format, out valueExpression);
|
||||
GetParamInfo(paramMap, inputParam, out type, out format, out valueExpression);
|
||||
ValueExpression[] toStringParams = format is null ? [] : [Literal(format)];
|
||||
valueExpression = isString ? valueExpression : valueExpression.Invoke(nameof(ToString), toStringParams);
|
||||
valueExpression = type?.Equals(typeof(string)) == true ? valueExpression : valueExpression.Invoke(nameof(ToString), toStringParams);
|
||||
statements.Add(uri.AppendPath(valueExpression, true).Terminate());
|
||||
}
|
||||
|
||||
|
@ -285,9 +320,9 @@ namespace Microsoft.Generator.CSharp.ClientModel.Providers
|
|||
}
|
||||
}
|
||||
|
||||
private static void GetParamInfo(Dictionary<string, ParameterProvider> paramMap, InputParameter inputParam, out bool isString, out string? format, out ValueExpression valueExpression)
|
||||
private static void GetParamInfo(Dictionary<string, ParameterProvider> paramMap, InputParameter inputParam, out CSharpType? type, out string? format, out ValueExpression valueExpression)
|
||||
{
|
||||
isString = ClientModelPlugin.Instance.TypeFactory.CreateCSharpType(inputParam.Type)?.Equals(typeof(string)) == true;
|
||||
type = ClientModelPlugin.Instance.TypeFactory.CreateCSharpType(inputParam.Type);
|
||||
if (inputParam.Kind == InputOperationParameterKind.Constant)
|
||||
{
|
||||
valueExpression = Literal((inputParam.Type as InputLiteralType)?.Value);
|
||||
|
@ -300,7 +335,6 @@ namespace Microsoft.Generator.CSharp.ClientModel.Providers
|
|||
{
|
||||
var csharpType = paramProvider.Field is null ? paramProvider.Type : paramProvider.Field.Type;
|
||||
valueExpression = csharpType.ToSerial(paramProvider);
|
||||
isString = true;
|
||||
format = null;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace Microsoft.Generator.CSharp.ClientModel.Providers
|
|||
Return(Static<ClientResult>().Invoke(
|
||||
nameof(ClientResult.FromValue),
|
||||
[
|
||||
responseBodyType.Equals(typeof(string)) ? result.GetRawResponse().Content().InvokeToString() : result.CastTo(responseBodyType),
|
||||
responseBodyType.Equals(typeof(string)) ? result.GetRawResponse().Content().InvokeToString() : GetResultConversion(result, responseBodyType),
|
||||
result.Invoke("GetRawResponse")
|
||||
])),
|
||||
];
|
||||
|
@ -96,6 +96,15 @@ namespace Microsoft.Generator.CSharp.ClientModel.Providers
|
|||
return convenienceMethod;
|
||||
}
|
||||
|
||||
private ValueExpression GetResultConversion(ScopedApi<ClientResult> result, CSharpType resultType)
|
||||
{
|
||||
if (resultType.Equals(typeof(BinaryData)))
|
||||
{
|
||||
return result.GetRawResponse().Content();
|
||||
}
|
||||
return result.CastTo(resultType);
|
||||
}
|
||||
|
||||
private IReadOnlyList<ValueExpression> GetParamConversions(IReadOnlyList<ParameterProvider> convenienceMethodParameters)
|
||||
{
|
||||
List<ValueExpression> conversions = new List<ValueExpression>();
|
||||
|
@ -112,6 +121,10 @@ namespace Microsoft.Generator.CSharp.ClientModel.Providers
|
|||
conversions.Add(param.Type.ToSerial(param));
|
||||
}
|
||||
}
|
||||
else if (param.Type.Equals(typeof(BinaryData)) && param.Location == ParameterLocation.Body)
|
||||
{
|
||||
conversions.Add(BinaryContentSnippets.Create(param));
|
||||
}
|
||||
else
|
||||
{
|
||||
conversions.Add(param);
|
||||
|
|
|
@ -20,6 +20,12 @@ namespace Microsoft.Generator.CSharp.ClientModel.Snippets
|
|||
public static InvokeMethodExpression AppendQuery(this ScopedApi<ClientUriBuilderDefinition> uriBuilder, ValueExpression name, ValueExpression value, bool shouldEscape)
|
||||
=> uriBuilder.Invoke("AppendQuery", [name, value, Literal(shouldEscape)]);
|
||||
|
||||
public static InvokeMethodExpression AppendQuery(this ScopedApi<ClientUriBuilderDefinition> uriBuilder, ValueExpression name, ValueExpression value, string? format, bool shouldEscape)
|
||||
=> uriBuilder.Invoke("AppendQuery", [name, value, Literal(format), Literal(shouldEscape)]);
|
||||
|
||||
public static InvokeMethodExpression AppendQueryDelimited(this ScopedApi<ClientUriBuilderDefinition> uriBuilder, ValueExpression name, ValueExpression value, string? format, bool shouldEscape)
|
||||
=> uriBuilder.Invoke("AppendQueryDelimited", [name, value, Literal(","), Literal(format), Literal(shouldEscape)]);
|
||||
|
||||
public static ScopedApi<Uri> ToUri(this ScopedApi<ClientUriBuilderDefinition> uriBuilder)
|
||||
=> uriBuilder.Invoke("ToUri").As<Uri>();
|
||||
}
|
||||
|
|
|
@ -21,6 +21,9 @@ namespace Microsoft.Generator.CSharp.ClientModel.Snippets
|
|||
public static MethodBodyStatement SetHeaderValue(this ScopedApi<PipelineRequest> pipelineRequest, string name, ValueExpression value)
|
||||
=> pipelineRequest.Property(nameof(PipelineRequest.Headers)).Invoke(nameof(PipelineRequestHeaders.Set), Literal(name), value).Terminate();
|
||||
|
||||
public static MethodBodyStatement AddHeaderValue(this ScopedApi<PipelineRequest> pipelineRequest, string name, ValueExpression value)
|
||||
=> pipelineRequest.Property(nameof(PipelineRequest.Headers)).Invoke(nameof(PipelineRequestHeaders.Add), [Literal(name), value]).Terminate();
|
||||
|
||||
public static MethodBodyStatement SetContent(this ScopedApi<PipelineRequest> pipelineRequest, ValueExpression content)
|
||||
=> pipelineRequest.Property(nameof(PipelineRequest.Content)).Assign(content).Terminate();
|
||||
}
|
||||
|
|
|
@ -35,6 +35,11 @@
|
|||
"commandName": "Executable",
|
||||
"executablePath": "$(SolutionDir)/../dist/generator/Microsoft.Generator.CSharp.exe"
|
||||
},
|
||||
"http-encode-bytes": {
|
||||
"commandLineArgs": "$(SolutionDir)/TestProjects/CadlRanch/http/encode/bytes -p StubLibraryPlugin",
|
||||
"commandName": "Executable",
|
||||
"executablePath": "$(SolutionDir)/../dist/generator/Microsoft.Generator.CSharp.exe"
|
||||
},
|
||||
"http-payload-xml": {
|
||||
"commandLineArgs": "$(SolutionDir)/TestProjects/CadlRanch/http/payload/xml -p StubLibraryPlugin",
|
||||
"commandName": "Executable",
|
||||
|
|
|
@ -0,0 +1,203 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.ClientModel;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using AutoRest.TestServer.Tests.Infrastructure;
|
||||
using Encode.Bytes;
|
||||
using Encode.Bytes.Models;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace TestProjects.CadlRanch.Tests.Http.Encode.Bytes
|
||||
{
|
||||
public class EncodeBytesTests : CadlRanchTestBase
|
||||
{
|
||||
private string SamplePngPath = Path.Combine(CadlRanchServer.GetSpecDirectory(), "assets", "image.png");
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_Query_default() => Test(async (host) =>
|
||||
{
|
||||
BinaryData data = BinaryData.FromString("test");
|
||||
|
||||
ClientResult result = await new BytesClient(host, null).GetQueryClient().DefaultAsync(data);
|
||||
Assert.AreEqual(204, result.GetRawResponse().Status);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_Query_base64() => Test(async (host) =>
|
||||
{
|
||||
BinaryData data = BinaryData.FromString("test");
|
||||
ClientResult result = await new BytesClient(host, null).GetQueryClient().Base64Async(data);
|
||||
Assert.AreEqual(204, result.GetRawResponse().Status);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_Query_base64url() => Test(async (host) =>
|
||||
{
|
||||
BinaryData data = BinaryData.FromString("test");
|
||||
ClientResult result = await new BytesClient(host, null).GetQueryClient().Base64urlAsync(data);
|
||||
Assert.AreEqual(204, result.GetRawResponse().Status);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_Query_base64urlArray() => Test(async (host) =>
|
||||
{
|
||||
BinaryData data1 = BinaryData.FromString("test");
|
||||
BinaryData data2 = BinaryData.FromString("test");
|
||||
ClientResult result = await new BytesClient(host, null).GetQueryClient().Base64urlArrayAsync(new[] { data1, data2 });
|
||||
Assert.AreEqual(204, result.GetRawResponse().Status);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_Property_default() => Test(async (host) =>
|
||||
{
|
||||
BinaryData data = BinaryData.FromString("test");
|
||||
var body = new DefaultBytesProperty(data);
|
||||
DefaultBytesProperty response = await new BytesClient(host, null).GetPropertyClient().DefaultAsync(body);
|
||||
BinaryDataAssert.AreEqual(body.Value, response.Value);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_Property_base64() => Test(async (host) =>
|
||||
{
|
||||
BinaryData data = BinaryData.FromString("test");
|
||||
var body = new Base64BytesProperty(data);
|
||||
Base64BytesProperty response = await new BytesClient(host, null).GetPropertyClient().Base64Async(body);
|
||||
BinaryDataAssert.AreEqual(body.Value, response.Value);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_Property_base64url() => Test(async (host) =>
|
||||
{
|
||||
BinaryData data = BinaryData.FromString("test");
|
||||
var body = new Base64urlBytesProperty(data);
|
||||
Base64urlBytesProperty response = await new BytesClient(host, null).GetPropertyClient().Base64urlAsync(body);
|
||||
BinaryDataAssert.AreEqual(body.Value, response.Value);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Base64urlArrayBytesProperty() => Test(async (host) =>
|
||||
{
|
||||
BinaryData data1 = BinaryData.FromString("test");
|
||||
BinaryData data2 = BinaryData.FromString("test");
|
||||
var body = new Base64urlArrayBytesProperty(new[] {data1,data2});
|
||||
Base64urlArrayBytesProperty response = await new BytesClient(host, null).GetPropertyClient().Base64urlArrayAsync(body);
|
||||
BinaryDataAssert.AreEqual(body.Value[0], response.Value[0]);
|
||||
BinaryDataAssert.AreEqual(body.Value[1], response.Value[1]);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_Header_default() => Test(async (host) =>
|
||||
{
|
||||
BinaryData data = BinaryData.FromString("test");
|
||||
|
||||
ClientResult result = await new BytesClient(host, null).GetHeaderClient().DefaultAsync(data);
|
||||
Assert.AreEqual(204, result.GetRawResponse().Status);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_Header_base64() => Test(async (host) =>
|
||||
{
|
||||
|
||||
BinaryData data = BinaryData.FromString("test");
|
||||
ClientResult result = await new BytesClient(host, null).GetHeaderClient().Base64Async(data);
|
||||
Assert.AreEqual(204, result.GetRawResponse().Status);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_Header_base64url() => Test(async (host) =>
|
||||
{
|
||||
BinaryData data = BinaryData.FromString("test");
|
||||
ClientResult result = await new BytesClient(host, null).GetHeaderClient().Base64urlAsync(data);
|
||||
Assert.AreEqual(204, result.GetRawResponse().Status);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_Header_base64urlArray() => Test(async (host) =>
|
||||
{
|
||||
BinaryData data1 = BinaryData.FromString("test");
|
||||
BinaryData data2 = BinaryData.FromString("test");
|
||||
ClientResult result = await new BytesClient(host, null).GetHeaderClient().Base64urlArrayAsync(new[] { data1, data2 });
|
||||
Assert.AreEqual(204, result.GetRawResponse().Status);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_RequestBody_default() => Test(async (host) =>
|
||||
{
|
||||
BinaryData data = new BinaryData($"\"{Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes("test"))}\"");
|
||||
ClientResult result = await new BytesClient(host, null).GetRequestBodyClient().DefaultAsync(data);
|
||||
Assert.AreEqual(204, result.GetRawResponse().Status);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_RequestBody_octetStream() => Test(async (host) =>
|
||||
{
|
||||
BinaryData data = new BinaryData(File.ReadAllBytes(SamplePngPath));
|
||||
ClientResult result = await new BytesClient(host, null).GetRequestBodyClient().OctetStreamAsync(data);
|
||||
Assert.AreEqual(204, result.GetRawResponse().Status);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_RequestBody_customContentType() => Test(async (host) =>
|
||||
{
|
||||
BinaryData data = new BinaryData(File.ReadAllBytes(SamplePngPath));
|
||||
ClientResult result = await new BytesClient(host, null).GetRequestBodyClient().CustomContentTypeAsync(data);
|
||||
Assert.AreEqual(204, result.GetRawResponse().Status);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_RequestBody_base64() => Test(async (host) =>
|
||||
{
|
||||
BinaryData data = new BinaryData($"\"{Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes("test"))}\"");
|
||||
ClientResult result = await new BytesClient(host, null).GetRequestBodyClient().Base64Async(data);
|
||||
Assert.AreEqual(204, result.GetRawResponse().Status);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_RequestBody_base64url() => Test(async (host) =>
|
||||
{
|
||||
BinaryData data = new BinaryData($"\"{Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes("test")).Replace('+', '-').Replace('/', '_').Replace("=", "")}\"");
|
||||
ClientResult result = await new BytesClient(host, null).GetRequestBodyClient().Base64urlAsync(data);
|
||||
Assert.AreEqual(204, result.GetRawResponse().Status);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_ResponseBody_default() => Test(async (host) =>
|
||||
{
|
||||
var response = await new BytesClient(host, null).GetResponseBodyClient().DefaultAsync();
|
||||
CollectionAssert.AreEqual(BinaryData.FromObjectAsJson("dGVzdA==").ToArray(), response.Value.ToArray());
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_ResponseBody_octetStream() => Test(async (host) =>
|
||||
{
|
||||
BinaryData data = new BinaryData(File.ReadAllBytes(SamplePngPath));
|
||||
var response = await new BytesClient(host, null).GetResponseBodyClient().OctetStreamAsync();
|
||||
CollectionAssert.AreEqual(data.ToArray(), response.Value.ToArray());
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_ResponseBody_customContentType() => Test(async (host) =>
|
||||
{
|
||||
BinaryData data = new BinaryData(File.ReadAllBytes(SamplePngPath));
|
||||
BinaryData result = await new BytesClient(host, null).GetResponseBodyClient().CustomContentTypeAsync();
|
||||
BinaryDataAssert.AreEqual(data, result);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_ResponseBody_base64() => Test(async (host) =>
|
||||
{
|
||||
BinaryData result = await new BytesClient(host, null).GetResponseBodyClient().Base64Async();
|
||||
BinaryDataAssert.AreEqual(BinaryData.FromObjectAsJson("dGVzdA=="), result);
|
||||
});
|
||||
|
||||
[CadlRanchTest]
|
||||
public Task Encode_Bytes_ResponseBody_base64url() => Test(async (host) =>
|
||||
{
|
||||
BinaryData result = await new BytesClient(host, null).GetResponseBodyClient().Base64urlAsync();
|
||||
BinaryDataAssert.AreEqual(BinaryData.FromObjectAsJson("dGVzdA"), result);
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace AutoRest.TestServer.Tests.Infrastructure
|
||||
{
|
||||
public static class BinaryDataAssert
|
||||
{
|
||||
public static void AreEqual(BinaryData expected, BinaryData result)
|
||||
{
|
||||
CollectionAssert.AreEqual(expected?.ToArray(), result?.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"output-folder": ".",
|
||||
"namespace": "Encode.Bytes",
|
||||
"library-name": "Encode.Bytes",
|
||||
"use-model-reader-writer": true
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29709.97
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Encode.Bytes", "src\Encode.Bytes.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,16 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Description>This is the Encode.Bytes client library for developing .NET applications with rich experience.</Description>
|
||||
<AssemblyTitle>SDK Code Generation Encode.Bytes</AssemblyTitle>
|
||||
<Version>1.0.0-beta.1</Version>
|
||||
<PackageTags>Encode.Bytes</PackageTags>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.ClientModel" Version="1.1.0-beta.4" />
|
||||
<PackageReference Include="System.Text.Json" Version="8.0.4" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,28 @@
|
|||
// <auto-generated/>
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.ClientModel.Primitives;
|
||||
|
||||
namespace Encode.Bytes
|
||||
{
|
||||
public partial class BytesClient
|
||||
{
|
||||
public BytesClient() : this(new Uri("http://localhost:3000"), new BytesClientOptions()) => throw null;
|
||||
|
||||
public BytesClient(Uri endpoint, BytesClientOptions options) => throw null;
|
||||
|
||||
public ClientPipeline Pipeline => throw null;
|
||||
|
||||
public virtual Query GetQueryClient() => throw null;
|
||||
|
||||
public virtual Property GetPropertyClient() => throw null;
|
||||
|
||||
public virtual Header GetHeaderClient() => throw null;
|
||||
|
||||
public virtual RequestBody GetRequestBodyClient() => throw null;
|
||||
|
||||
public virtual ResponseBody GetResponseBodyClient() => throw null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
// <auto-generated/>
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System.ClientModel.Primitives;
|
||||
|
||||
namespace Encode.Bytes
|
||||
{
|
||||
public partial class BytesClientOptions : ClientPipelineOptions
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
// <auto-generated/>
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Encode.Bytes.Models
|
||||
{
|
||||
public static partial class EncodeBytesModelFactory
|
||||
{
|
||||
public static DefaultBytesProperty DefaultBytesProperty(BinaryData value = default) => throw null;
|
||||
|
||||
public static Base64BytesProperty Base64BytesProperty(BinaryData value = default) => throw null;
|
||||
|
||||
public static Base64urlBytesProperty Base64urlBytesProperty(BinaryData value = default) => throw null;
|
||||
|
||||
public static Base64urlArrayBytesProperty Base64urlArrayBytesProperty(IEnumerable<BinaryData> value = default) => throw null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
// <auto-generated/>
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.ClientModel;
|
||||
using System.ClientModel.Primitives;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Encode.Bytes
|
||||
{
|
||||
public partial class Header
|
||||
{
|
||||
protected Header() => throw null;
|
||||
|
||||
public ClientPipeline Pipeline => throw null;
|
||||
|
||||
public virtual ClientResult Default(BinaryData value, RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> DefaultAsync(BinaryData value, RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult Default(BinaryData value) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> DefaultAsync(BinaryData value) => throw null;
|
||||
|
||||
public virtual ClientResult Base64(BinaryData value, RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64Async(BinaryData value, RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult Base64(BinaryData value) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64Async(BinaryData value) => throw null;
|
||||
|
||||
public virtual ClientResult Base64url(BinaryData value, RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64urlAsync(BinaryData value, RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult Base64url(BinaryData value) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64urlAsync(BinaryData value) => throw null;
|
||||
|
||||
public virtual ClientResult Base64urlArray(IList<BinaryData> value, RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64urlArrayAsync(IList<BinaryData> value, RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult Base64urlArray(IList<BinaryData> value) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64urlArrayAsync(IList<BinaryData> value) => throw null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
// <auto-generated/>
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.ClientModel;
|
||||
using System.ClientModel.Primitives;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Encode.Bytes.Models
|
||||
{
|
||||
public partial class Base64BytesProperty : IJsonModel<Base64BytesProperty>
|
||||
{
|
||||
void IJsonModel<Base64BytesProperty>.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
Base64BytesProperty IJsonModel<Base64BytesProperty>.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
protected virtual Base64BytesProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
BinaryData IPersistableModel<Base64BytesProperty>.Write(ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
Base64BytesProperty IPersistableModel<Base64BytesProperty>.Create(BinaryData data, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
protected virtual Base64BytesProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
string IPersistableModel<Base64BytesProperty>.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
public static implicit operator BinaryContent(Base64BytesProperty base64BytesProperty) => throw null;
|
||||
|
||||
public static explicit operator Base64BytesProperty(ClientResult result) => throw null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
// <auto-generated/>
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
|
||||
namespace Encode.Bytes.Models
|
||||
{
|
||||
public partial class Base64BytesProperty
|
||||
{
|
||||
public Base64BytesProperty(BinaryData value) => throw null;
|
||||
|
||||
public BinaryData Value
|
||||
{
|
||||
get => throw null;
|
||||
set => throw null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
// <auto-generated/>
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.ClientModel;
|
||||
using System.ClientModel.Primitives;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Encode.Bytes.Models
|
||||
{
|
||||
public partial class Base64urlArrayBytesProperty : IJsonModel<Base64urlArrayBytesProperty>
|
||||
{
|
||||
void IJsonModel<Base64urlArrayBytesProperty>.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
Base64urlArrayBytesProperty IJsonModel<Base64urlArrayBytesProperty>.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
protected virtual Base64urlArrayBytesProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
BinaryData IPersistableModel<Base64urlArrayBytesProperty>.Write(ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
Base64urlArrayBytesProperty IPersistableModel<Base64urlArrayBytesProperty>.Create(BinaryData data, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
protected virtual Base64urlArrayBytesProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
string IPersistableModel<Base64urlArrayBytesProperty>.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
public static implicit operator BinaryContent(Base64urlArrayBytesProperty base64urlArrayBytesProperty) => throw null;
|
||||
|
||||
public static explicit operator Base64urlArrayBytesProperty(ClientResult result) => throw null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
// <auto-generated/>
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Encode.Bytes.Models
|
||||
{
|
||||
public partial class Base64urlArrayBytesProperty
|
||||
{
|
||||
public Base64urlArrayBytesProperty(IEnumerable<BinaryData> value) => throw null;
|
||||
|
||||
public IList<BinaryData> Value => throw null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
// <auto-generated/>
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.ClientModel;
|
||||
using System.ClientModel.Primitives;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Encode.Bytes.Models
|
||||
{
|
||||
public partial class Base64urlBytesProperty : IJsonModel<Base64urlBytesProperty>
|
||||
{
|
||||
void IJsonModel<Base64urlBytesProperty>.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
Base64urlBytesProperty IJsonModel<Base64urlBytesProperty>.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
protected virtual Base64urlBytesProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
BinaryData IPersistableModel<Base64urlBytesProperty>.Write(ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
Base64urlBytesProperty IPersistableModel<Base64urlBytesProperty>.Create(BinaryData data, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
protected virtual Base64urlBytesProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
string IPersistableModel<Base64urlBytesProperty>.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
public static implicit operator BinaryContent(Base64urlBytesProperty base64urlBytesProperty) => throw null;
|
||||
|
||||
public static explicit operator Base64urlBytesProperty(ClientResult result) => throw null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
// <auto-generated/>
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
|
||||
namespace Encode.Bytes.Models
|
||||
{
|
||||
public partial class Base64urlBytesProperty
|
||||
{
|
||||
public Base64urlBytesProperty(BinaryData value) => throw null;
|
||||
|
||||
public BinaryData Value
|
||||
{
|
||||
get => throw null;
|
||||
set => throw null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
// <auto-generated/>
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.ClientModel;
|
||||
using System.ClientModel.Primitives;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Encode.Bytes.Models
|
||||
{
|
||||
public partial class DefaultBytesProperty : IJsonModel<DefaultBytesProperty>
|
||||
{
|
||||
void IJsonModel<DefaultBytesProperty>.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
DefaultBytesProperty IJsonModel<DefaultBytesProperty>.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
protected virtual DefaultBytesProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
BinaryData IPersistableModel<DefaultBytesProperty>.Write(ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
DefaultBytesProperty IPersistableModel<DefaultBytesProperty>.Create(BinaryData data, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
protected virtual DefaultBytesProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
string IPersistableModel<DefaultBytesProperty>.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null;
|
||||
|
||||
public static implicit operator BinaryContent(DefaultBytesProperty defaultBytesProperty) => throw null;
|
||||
|
||||
public static explicit operator DefaultBytesProperty(ClientResult result) => throw null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
// <auto-generated/>
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
|
||||
namespace Encode.Bytes.Models
|
||||
{
|
||||
public partial class DefaultBytesProperty
|
||||
{
|
||||
public DefaultBytesProperty(BinaryData value) => throw null;
|
||||
|
||||
public BinaryData Value
|
||||
{
|
||||
get => throw null;
|
||||
set => throw null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
// <auto-generated/>
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System.ClientModel;
|
||||
using System.ClientModel.Primitives;
|
||||
using System.Threading.Tasks;
|
||||
using Encode.Bytes.Models;
|
||||
|
||||
namespace Encode.Bytes
|
||||
{
|
||||
public partial class Property
|
||||
{
|
||||
protected Property() => throw null;
|
||||
|
||||
public ClientPipeline Pipeline => throw null;
|
||||
|
||||
public virtual ClientResult Default(BinaryContent content, RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> DefaultAsync(BinaryContent content, RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult<DefaultBytesProperty> Default(DefaultBytesProperty body) => throw null;
|
||||
|
||||
public virtual Task<ClientResult<DefaultBytesProperty>> DefaultAsync(DefaultBytesProperty body) => throw null;
|
||||
|
||||
public virtual ClientResult Base64(BinaryContent content, RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64Async(BinaryContent content, RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult<Base64BytesProperty> Base64(Base64BytesProperty body) => throw null;
|
||||
|
||||
public virtual Task<ClientResult<Base64BytesProperty>> Base64Async(Base64BytesProperty body) => throw null;
|
||||
|
||||
public virtual ClientResult Base64url(BinaryContent content, RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64urlAsync(BinaryContent content, RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult<Base64urlBytesProperty> Base64url(Base64urlBytesProperty body) => throw null;
|
||||
|
||||
public virtual Task<ClientResult<Base64urlBytesProperty>> Base64urlAsync(Base64urlBytesProperty body) => throw null;
|
||||
|
||||
public virtual ClientResult Base64urlArray(BinaryContent content, RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64urlArrayAsync(BinaryContent content, RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult<Base64urlArrayBytesProperty> Base64urlArray(Base64urlArrayBytesProperty body) => throw null;
|
||||
|
||||
public virtual Task<ClientResult<Base64urlArrayBytesProperty>> Base64urlArrayAsync(Base64urlArrayBytesProperty body) => throw null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
// <auto-generated/>
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.ClientModel;
|
||||
using System.ClientModel.Primitives;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Encode.Bytes
|
||||
{
|
||||
public partial class Query
|
||||
{
|
||||
protected Query() => throw null;
|
||||
|
||||
public ClientPipeline Pipeline => throw null;
|
||||
|
||||
public virtual ClientResult Default(BinaryData value, RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> DefaultAsync(BinaryData value, RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult Default(BinaryData value) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> DefaultAsync(BinaryData value) => throw null;
|
||||
|
||||
public virtual ClientResult Base64(BinaryData value, RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64Async(BinaryData value, RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult Base64(BinaryData value) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64Async(BinaryData value) => throw null;
|
||||
|
||||
public virtual ClientResult Base64url(BinaryData value, RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64urlAsync(BinaryData value, RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult Base64url(BinaryData value) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64urlAsync(BinaryData value) => throw null;
|
||||
|
||||
public virtual ClientResult Base64urlArray(IList<BinaryData> value, RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64urlArrayAsync(IList<BinaryData> value, RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult Base64urlArray(IList<BinaryData> value) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64urlArrayAsync(IList<BinaryData> value) => throw null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
// <auto-generated/>
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.ClientModel;
|
||||
using System.ClientModel.Primitives;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Encode.Bytes
|
||||
{
|
||||
public partial class RequestBody
|
||||
{
|
||||
protected RequestBody() => throw null;
|
||||
|
||||
public ClientPipeline Pipeline => throw null;
|
||||
|
||||
public virtual ClientResult Default(BinaryContent content, RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> DefaultAsync(BinaryContent content, RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult Default(BinaryData value) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> DefaultAsync(BinaryData value) => throw null;
|
||||
|
||||
public virtual ClientResult OctetStream(BinaryContent content, RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> OctetStreamAsync(BinaryContent content, RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult OctetStream(BinaryData value) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> OctetStreamAsync(BinaryData value) => throw null;
|
||||
|
||||
public virtual ClientResult CustomContentType(BinaryContent content, RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> CustomContentTypeAsync(BinaryContent content, RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult CustomContentType(BinaryData value) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> CustomContentTypeAsync(BinaryData value) => throw null;
|
||||
|
||||
public virtual ClientResult Base64(BinaryContent content, RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64Async(BinaryContent content, RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult Base64(BinaryData value) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64Async(BinaryData value) => throw null;
|
||||
|
||||
public virtual ClientResult Base64url(BinaryContent content, RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64urlAsync(BinaryContent content, RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult Base64url(BinaryData value) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64urlAsync(BinaryData value) => throw null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
// <auto-generated/>
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.ClientModel;
|
||||
using System.ClientModel.Primitives;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Encode.Bytes
|
||||
{
|
||||
public partial class ResponseBody
|
||||
{
|
||||
protected ResponseBody() => throw null;
|
||||
|
||||
public ClientPipeline Pipeline => throw null;
|
||||
|
||||
public virtual ClientResult Default(RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> DefaultAsync(RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult<BinaryData> Default() => throw null;
|
||||
|
||||
public virtual Task<ClientResult<BinaryData>> DefaultAsync() => throw null;
|
||||
|
||||
public virtual ClientResult OctetStream(RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> OctetStreamAsync(RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult<BinaryData> OctetStream() => throw null;
|
||||
|
||||
public virtual Task<ClientResult<BinaryData>> OctetStreamAsync() => throw null;
|
||||
|
||||
public virtual ClientResult CustomContentType(RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> CustomContentTypeAsync(RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult<BinaryData> CustomContentType() => throw null;
|
||||
|
||||
public virtual Task<ClientResult<BinaryData>> CustomContentTypeAsync() => throw null;
|
||||
|
||||
public virtual ClientResult Base64(RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64Async(RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult<BinaryData> Base64() => throw null;
|
||||
|
||||
public virtual Task<ClientResult<BinaryData>> Base64Async() => throw null;
|
||||
|
||||
public virtual ClientResult Base64url(RequestOptions options) => throw null;
|
||||
|
||||
public virtual Task<ClientResult> Base64urlAsync(RequestOptions options) => throw null;
|
||||
|
||||
public virtual ClientResult<BinaryData> Base64url() => throw null;
|
||||
|
||||
public virtual Task<ClientResult<BinaryData>> Base64urlAsync() => throw null;
|
||||
}
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -12,8 +12,8 @@
|
|||
"json-serialize-refs": "0.1.0-0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@azure-tools/cadl-ranch": "0.14.1",
|
||||
"@azure-tools/cadl-ranch-specs": "0.35.3",
|
||||
"@azure-tools/cadl-ranch": "0.14.3",
|
||||
"@azure-tools/cadl-ranch-specs": "0.36.0",
|
||||
"@azure-tools/typespec-azure-core": "0.45.0",
|
||||
"@azure-tools/typespec-client-generator-core": "0.45.1",
|
||||
"@microsoft/api-extractor": "^7.40.3",
|
||||
|
@ -63,13 +63,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@azure-tools/cadl-ranch": {
|
||||
"version": "0.14.1",
|
||||
"resolved": "https://registry.npmjs.org/@azure-tools/cadl-ranch/-/cadl-ranch-0.14.1.tgz",
|
||||
"integrity": "sha512-D/wuAiVlBwK5WXmWg+OkSduVosQGuzRJzahFLgAVD9pzWkKwnbAd9z+F9ThqALItcW4PdJnLzE1n1l/m3Dt4kA==",
|
||||
"version": "0.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@azure-tools/cadl-ranch/-/cadl-ranch-0.14.3.tgz",
|
||||
"integrity": "sha512-7UVhTi5dHR9hH6OnpWQONvDJGx5t5sU9q8BYHoJU0gdaTy0x23EHie5GTMg7aIFI896kuksu4iggUnQaCm2AnA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@azure-tools/cadl-ranch-api": "~0.4.5",
|
||||
"@azure-tools/cadl-ranch-api": "~0.4.6",
|
||||
"@azure-tools/cadl-ranch-coverage-sdk": "~0.8.3",
|
||||
"@azure-tools/cadl-ranch-expect": "~0.15.1",
|
||||
"@azure/identity": "^4.4.1",
|
||||
|
@ -102,11 +101,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@azure-tools/cadl-ranch-api": {
|
||||
"version": "0.4.5",
|
||||
"resolved": "https://registry.npmjs.org/@azure-tools/cadl-ranch-api/-/cadl-ranch-api-0.4.5.tgz",
|
||||
"integrity": "sha512-OXJ65ibuli0q7gsWo/5lv8BznSv4thpBxL5qERUyd1w6tvOOCg5iBBidZMUbmlasYspLCP25YlKqiOgbdPhHDQ==",
|
||||
"version": "0.4.6",
|
||||
"resolved": "https://registry.npmjs.org/@azure-tools/cadl-ranch-api/-/cadl-ranch-api-0.4.6.tgz",
|
||||
"integrity": "sha512-IwIpl+wZYXWdDuY3hoI81n7rkm90CcjMWxQLhUYjBhppvc4o1YYgkV9jfxMBaclrDgS1R2TrAq2Xul/+kY99lg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"body-parser": "^1.20.2",
|
||||
"deep-equal": "^2.2.0",
|
||||
|
@ -253,13 +251,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@azure-tools/cadl-ranch-specs": {
|
||||
"version": "0.35.3",
|
||||
"resolved": "https://registry.npmjs.org/@azure-tools/cadl-ranch-specs/-/cadl-ranch-specs-0.35.3.tgz",
|
||||
"integrity": "sha512-sGbOirnvqnOmFgkGj2jVUZxZSrHfRKQbkJaX6BtGWKxchgHPCliV/mbPxsAPqhNXHooQ0yw7vpl8oeXT7i1HqQ==",
|
||||
"version": "0.36.0",
|
||||
"resolved": "https://registry.npmjs.org/@azure-tools/cadl-ranch-specs/-/cadl-ranch-specs-0.36.0.tgz",
|
||||
"integrity": "sha512-hz8dYTaf9muzJfCRjU72dcNKqhinti86vh4yPXQCzh5gnxEHaKo1bDG+GF22kHY1YnocHHu8xzZXK6jLfMFcrA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@azure-tools/cadl-ranch": "~0.14.1",
|
||||
"@azure-tools/cadl-ranch": "~0.14.2",
|
||||
"@azure-tools/cadl-ranch-api": "~0.4.5"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
@ -55,8 +55,8 @@
|
|||
"@typespec/versioning": ">=0.58.0 <1.0.0 || ~0.59.0-0 || ~0.60.0-0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@azure-tools/cadl-ranch": "0.14.1",
|
||||
"@azure-tools/cadl-ranch-specs": "0.35.3",
|
||||
"@azure-tools/cadl-ranch": "0.14.3",
|
||||
"@azure-tools/cadl-ranch-specs": "0.36.0",
|
||||
"@azure-tools/typespec-azure-core": "0.45.0",
|
||||
"@azure-tools/typespec-client-generator-core": "0.45.1",
|
||||
"@microsoft/api-extractor": "^7.40.3",
|
||||
|
|
Загрузка…
Ссылка в новой задаче