forked from Azure/azure-sdk-for-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug with custom client request id generation (Azure#1104)
* Fix bug with custom client request id generation - Fix bug where parameter grouping broke custom client request id generation. * Add tests and regenerated expected * Fix static analysis errors - Fix string.Format missing CultureInfo.CurrentCulture. - ProcessClientRequestIdExtension check serviceClient for null.
- Loading branch information
Showing
43 changed files
with
1,017 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...ed/AcceptanceTests/AzureSpecials/Models/HeaderCustomNamedRequestIdParamGroupingHeaders.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for | ||
// license information. | ||
// | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
// Changes may cause incorrect behavior and will be lost if the code is | ||
// regenerated. | ||
|
||
namespace Fixtures.Azure.AcceptanceTestsAzureSpecials.Models | ||
{ | ||
using System; | ||
using System.Linq; | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Serialization; | ||
using Microsoft.Rest.Azure; | ||
|
||
/// <summary> | ||
/// Defines headers for customNamedRequestIdParamGrouping operation. | ||
/// </summary> | ||
public partial class HeaderCustomNamedRequestIdParamGroupingHeaders | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the | ||
/// HeaderCustomNamedRequestIdParamGroupingHeaders class. | ||
/// </summary> | ||
public HeaderCustomNamedRequestIdParamGroupingHeaders() { } | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the | ||
/// HeaderCustomNamedRequestIdParamGroupingHeaders class. | ||
/// </summary> | ||
public HeaderCustomNamedRequestIdParamGroupingHeaders(string fooRequestId = default(string)) | ||
{ | ||
FooRequestId = fooRequestId; | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets gets the foo-request-id. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "foo-request-id")] | ||
public string FooRequestId { get; set; } | ||
|
||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
...AcceptanceTests/AzureSpecials/Models/HeaderCustomNamedRequestIdParamGroupingParameters.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for | ||
// license information. | ||
// | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
// Changes may cause incorrect behavior and will be lost if the code is | ||
// regenerated. | ||
|
||
namespace Fixtures.Azure.AcceptanceTestsAzureSpecials.Models | ||
{ | ||
using System; | ||
using System.Linq; | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Serialization; | ||
using Microsoft.Rest.Azure; | ||
|
||
/// <summary> | ||
/// Additional parameters for the header_customNamedRequestIdParamGrouping | ||
/// operation. | ||
/// </summary> | ||
public partial class HeaderCustomNamedRequestIdParamGroupingParameters | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the | ||
/// HeaderCustomNamedRequestIdParamGroupingParameters class. | ||
/// </summary> | ||
public HeaderCustomNamedRequestIdParamGroupingParameters() { } | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the | ||
/// HeaderCustomNamedRequestIdParamGroupingParameters class. | ||
/// </summary> | ||
public HeaderCustomNamedRequestIdParamGroupingParameters(string fooClientRequestId) | ||
{ | ||
FooClientRequestId = fooClientRequestId; | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets the fooRequestId | ||
/// </summary> | ||
[JsonProperty(PropertyName = "")] | ||
public string FooClientRequestId { get; set; } | ||
|
||
/// <summary> | ||
/// Validate the object. Throws ValidationException if validation fails. | ||
/// </summary> | ||
public virtual void Validate() | ||
{ | ||
if (FooClientRequestId == null) | ||
{ | ||
throw new ValidationException(ValidationRules.CannotBeNull, "FooClientRequestId"); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.