-
Notifications
You must be signed in to change notification settings - Fork 262
Change OpenApiByte & OpenApiBinary #391
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
Changes from all commits
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 |
---|---|---|
|
@@ -6,12 +6,20 @@ namespace Microsoft.OpenApi.Any | |
/// <summary> | ||
/// Open API Byte | ||
/// </summary> | ||
public class OpenApiByte : OpenApiPrimitive<byte> | ||
public class OpenApiByte : OpenApiPrimitive<byte[]> | ||
{ | ||
/// <summary> | ||
/// Initializes the <see cref="OpenApiByte"/> class. | ||
/// </summary> | ||
public OpenApiByte(byte value) | ||
: this(new byte[] { value }) | ||
{ | ||
} | ||
|
||
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. Remove this #Closed 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. Remove this is a breaking change. We should avoid breaking change. 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. Yes, but this is technically a bug fix since our old model is incorrect In reply to: 265768029 [](ancestors = 265768029) 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.
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. |
||
/// <summary> | ||
/// Initializes the <see cref="OpenApiByte"/> class. | ||
/// </summary> | ||
public OpenApiByte(byte[] value) | ||
: base(value) | ||
{ | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.
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.
Try/catch unnecessary. #Closed
Uh oh!
There was an error while loading. Please reload this page.
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.
Leave the uplevel to process the exception? #Closed
Uh oh!
There was an error while loading. Please reload this page.
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.
Which exception case are we expecting here?
In reply to: 265768186 [](ancestors = 265768186)
Uh oh!
There was an error while loading. Please reload this page.
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.
GetBytes(..) may throw the following exception:
Exceptions:
// T:System.ArgumentNullException:
// s is null.
//
// T:System.Text.EncoderFallbackException:
// A fallback occurred (see Character Encoding in the .NET Framework for complete
// explanation)-and-System.Text.Encoding.EncoderFallback is set to System.Text.EncoderExceptionFallback. #Closed
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.
Got it. Let's do this:
In reply to: 265771477 [](ancestors = 265771477)
Uh oh!
There was an error while loading. Please reload this page.
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.
Changed. #Closed