Skip to content

Commit 7457fdb

Browse files
davidyeeDavid Yee
authored andcommitted
Add XML comments for SerializerSettings and match new OverrideSpecifiedNames default
1 parent 3275ea4 commit 7457fdb

File tree

3 files changed

+15
-3
lines changed
  • modules/openapi-generator/src/main/resources/csharp-netcore
  • samples/client/petstore/csharp-netcore

3 files changed

+15
-3
lines changed

modules/openapi-generator/src/main/resources/csharp-netcore/ApiClient.mustache

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ namespace {{packageName}}.Client
160160
{
161161
private readonly String _baseUrl;
162162
163+
/// <summary>
164+
/// Specifies the settings on a <see cref="JsonSerializer" /> object.
165+
/// These settings can be adjusted to accomodate custom serialization rules.
166+
/// </summary>
163167
public JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings
164168
{
165169
// OpenAPI generated types generally hide default constructors.
@@ -168,7 +172,7 @@ namespace {{packageName}}.Client
168172
{
169173
NamingStrategy = new CamelCaseNamingStrategy
170174
{
171-
OverrideSpecifiedNames = true
175+
OverrideSpecifiedNames = false
172176
}
173177
}
174178
};

samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient
164164
{
165165
private readonly String _baseUrl;
166166

167+
/// <summary>
168+
/// Specifies the settings on a <see cref="JsonSerializer" /> object.
169+
/// These settings can be adjusted to accomodate custom serialization rules.
170+
/// </summary>
167171
public JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings
168172
{
169173
// OpenAPI generated types generally hide default constructors.
@@ -172,7 +176,7 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient
172176
{
173177
NamingStrategy = new CamelCaseNamingStrategy
174178
{
175-
OverrideSpecifiedNames = true
179+
OverrideSpecifiedNames = false
176180
}
177181
}
178182
};

samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/ApiClient.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient
165165
{
166166
private readonly String _baseUrl;
167167

168+
/// <summary>
169+
/// Specifies the settings on a <see cref="JsonSerializer" /> object.
170+
/// These settings can be adjusted to accomodate custom serialization rules.
171+
/// </summary>
168172
public JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings
169173
{
170174
// OpenAPI generated types generally hide default constructors.
@@ -173,7 +177,7 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient
173177
{
174178
NamingStrategy = new CamelCaseNamingStrategy
175179
{
176-
OverrideSpecifiedNames = true
180+
OverrideSpecifiedNames = false
177181
}
178182
}
179183
};

0 commit comments

Comments
 (0)