-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve template to include tests, live resources, recordings etc #11540
Changes from all commits
c83b9f1
7087aa4
cdfd1ba
74c7d3d
51134f2
43d4d19
7a49c5b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Text; | ||
using System.Text.Json; | ||
using Azure.Core.Pipeline; | ||
|
@@ -75,11 +76,11 @@ private static byte[] DeserializeBody(IDictionary<string, string[]> headers, in | |
{ | ||
if (property.ValueKind == JsonValueKind.Object) | ||
{ | ||
var arrayBufferWriter = new ArrayBufferWriter<byte>(); | ||
using var writer = new Utf8JsonWriter(arrayBufferWriter); | ||
using var memoryStream = new MemoryStream(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't need to have IVT from lib to tests or manually include ArrayBufferWriter into test project anymore. |
||
using var writer = new Utf8JsonWriter(memoryStream); | ||
property.WriteTo(writer); | ||
writer.Flush(); | ||
return arrayBufferWriter.WrittenMemory.ToArray(); | ||
return memoryStream.ToArray(); | ||
} | ||
else if (property.ValueKind == JsonValueKind.Array) | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,32 @@ | ||
namespace Azure.Template | ||
{ | ||
public partial class TemplateClient | ||
public partial class MiniSecretClient | ||
{ | ||
protected TemplateClient() { } | ||
public TemplateClient(System.Uri endpoint) { } | ||
public TemplateClient(System.Uri endpoint, Azure.Template.TemplateClientOptions options) { } | ||
public virtual Azure.Response<Azure.Template.Models.ServiceModel> Operation(Azure.Template.Models.ServiceModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Template.Models.ServiceModel>> OperationAsync(Azure.Template.Models.ServiceModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
protected MiniSecretClient() { } | ||
public MiniSecretClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } | ||
public MiniSecretClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Template.MiniSecretClientOptions options) { } | ||
public virtual Azure.Response<Azure.Template.Models.SecretBundle> GetSecret(string secretName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Template.Models.SecretBundle>> GetSecretAsync(string secretName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } | ||
} | ||
public partial class TemplateClientOptions : Azure.Core.ClientOptions | ||
public partial class MiniSecretClientOptions : Azure.Core.ClientOptions | ||
{ | ||
public TemplateClientOptions(Azure.Template.TemplateClientOptions.ServiceVersion version = Azure.Template.TemplateClientOptions.ServiceVersion.V1) { } | ||
public MiniSecretClientOptions(Azure.Template.MiniSecretClientOptions.ServiceVersion version = Azure.Template.MiniSecretClientOptions.ServiceVersion.V7_0) { } | ||
public enum ServiceVersion | ||
{ | ||
V1 = 1, | ||
V7_0 = 1, | ||
} | ||
} | ||
} | ||
namespace Azure.Template.Models | ||
{ | ||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] | ||
public readonly partial struct DaysOfWeek : System.IEquatable<Azure.Template.Models.DaysOfWeek> | ||
public partial class SecretBundle | ||
{ | ||
private readonly object _dummy; | ||
private readonly int _dummyPrimitive; | ||
public DaysOfWeek(string value) { throw null; } | ||
public static Azure.Template.Models.DaysOfWeek Friday { get { throw null; } } | ||
public static Azure.Template.Models.DaysOfWeek Monday { get { throw null; } } | ||
public static Azure.Template.Models.DaysOfWeek Saturday { get { throw null; } } | ||
public static Azure.Template.Models.DaysOfWeek Sunday { get { throw null; } } | ||
public static Azure.Template.Models.DaysOfWeek Thursday { get { throw null; } } | ||
public static Azure.Template.Models.DaysOfWeek Tuesday { get { throw null; } } | ||
public static Azure.Template.Models.DaysOfWeek Wednesday { get { throw null; } } | ||
public bool Equals(Azure.Template.Models.DaysOfWeek other) { throw null; } | ||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] | ||
public override bool Equals(object obj) { throw null; } | ||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] | ||
public override int GetHashCode() { throw null; } | ||
public static bool operator ==(Azure.Template.Models.DaysOfWeek left, Azure.Template.Models.DaysOfWeek right) { throw null; } | ||
public static implicit operator Azure.Template.Models.DaysOfWeek (string value) { throw null; } | ||
public static bool operator !=(Azure.Template.Models.DaysOfWeek left, Azure.Template.Models.DaysOfWeek right) { throw null; } | ||
public override string ToString() { throw null; } | ||
} | ||
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] | ||
public readonly partial struct FruitType : System.IEquatable<Azure.Template.Models.FruitType> | ||
{ | ||
private readonly object _dummy; | ||
private readonly int _dummyPrimitive; | ||
public FruitType(string value) { throw null; } | ||
public static Azure.Template.Models.FruitType Apple { get { throw null; } } | ||
public static Azure.Template.Models.FruitType Pear { get { throw null; } } | ||
public bool Equals(Azure.Template.Models.FruitType other) { throw null; } | ||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] | ||
public override bool Equals(object obj) { throw null; } | ||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] | ||
public override int GetHashCode() { throw null; } | ||
public static bool operator ==(Azure.Template.Models.FruitType left, Azure.Template.Models.FruitType right) { throw null; } | ||
public static implicit operator Azure.Template.Models.FruitType (string value) { throw null; } | ||
public static bool operator !=(Azure.Template.Models.FruitType left, Azure.Template.Models.FruitType right) { throw null; } | ||
public override string ToString() { throw null; } | ||
} | ||
public partial class ServiceModel | ||
{ | ||
public ServiceModel(Azure.Template.Models.FruitType fruit, Azure.Template.Models.DaysOfWeek daysOfWeek) { } | ||
public Azure.Template.Models.DaysOfWeek DaysOfWeek { get { throw null; } } | ||
public Azure.Template.Models.FruitType Fruit { get { throw null; } } | ||
public string ModelProperty { get { throw null; } set { } } | ||
internal SecretBundle() { } | ||
public string ContentType { get { throw null; } } | ||
public string Id { get { throw null; } } | ||
public string Kid { get { throw null; } } | ||
public bool? Managed { get { throw null; } } | ||
public System.Collections.Generic.IReadOnlyDictionary<string, string> Tags { get { throw null; } } | ||
public string Value { get { throw null; } } | ||
} | ||
} |
This file was deleted.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes an issue where copying Azure.Template and re-running Export-API leaves the original API listing around and confuses people.