-
Notifications
You must be signed in to change notification settings - Fork 738
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix python code gen bug in handling "." in property name. (#1144)
- Loading branch information
Showing
73 changed files
with
2,165 additions
and
189 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
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
50 changes: 50 additions & 0 deletions
50
...Rest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/Paging/Models/Page1.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,50 @@ | ||
// 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.AcceptanceTestsPaging.Models | ||
{ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Newtonsoft.Json; | ||
using Microsoft.Rest.Azure; | ||
|
||
/// <summary> | ||
/// Defines a page in Azure responses. | ||
/// </summary> | ||
/// <typeparam name="T">Type of the page content items</typeparam> | ||
[JsonObject] | ||
public class Page1<T> : IPage<T> | ||
{ | ||
/// <summary> | ||
/// Gets the link to the next page. | ||
/// </summary> | ||
[JsonProperty("odata.nextLink")] | ||
public string NextPageLink { get; private set; } | ||
|
||
[JsonProperty("values")] | ||
private IList<T> Items{ get; set; } | ||
|
||
/// <summary> | ||
/// Returns an enumerator that iterates through the collection. | ||
/// </summary> | ||
/// <returns>A an enumerator that can be used to iterate through the collection.</returns> | ||
public IEnumerator<T> GetEnumerator() | ||
{ | ||
return (Items == null) ? Enumerable.Empty<T>().GetEnumerator() : Items.GetEnumerator(); | ||
} | ||
|
||
/// <summary> | ||
/// Returns an enumerator that iterates through the collection. | ||
/// </summary> | ||
/// <returns>A an enumerator that can be used to iterate through the collection.</returns> | ||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() | ||
{ | ||
return GetEnumerator(); | ||
} | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
...CSharp.Tests/Expected/AcceptanceTests/Paging/Models/PagingGetOdataMultiplePagesOptions.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,55 @@ | ||
// 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.AcceptanceTestsPaging.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 Paging_getOdataMultiplePages operation. | ||
/// </summary> | ||
public partial class PagingGetOdataMultiplePagesOptions | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the | ||
/// PagingGetOdataMultiplePagesOptions class. | ||
/// </summary> | ||
public PagingGetOdataMultiplePagesOptions() { } | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the | ||
/// PagingGetOdataMultiplePagesOptions class. | ||
/// </summary> | ||
public PagingGetOdataMultiplePagesOptions(int? maxresults = default(int?), int? timeout = default(int?)) | ||
{ | ||
Maxresults = maxresults; | ||
Timeout = timeout; | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets sets the maximum number of items to return in the | ||
/// response. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "")] | ||
public int? Maxresults { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets sets the maximum time that the server can spend | ||
/// processing the request, in seconds. The default is 30 seconds. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "")] | ||
public int? Timeout { get; set; } | ||
|
||
} | ||
} |
Oops, something went wrong.