Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 18 additions & 25 deletions codegen/Templates/csharp/AbstractOpenAPISchema.mustache
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{>partial_header}}

using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace {{packageName}}.{{modelPackage}}
{
Expand All @@ -14,35 +14,28 @@ namespace {{packageName}}.{{modelPackage}}
/// <summary>
/// Custom JSON serializer
/// </summary>
public static readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings
public static readonly JsonSerializerOptions SerializerOptions = new JsonSerializerOptions
{
// OpenAPI generated types generally hide default constructors.
ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor,
MissingMemberHandling = MissingMemberHandling.Error,
ContractResolver = new DefaultContractResolver
{
NamingStrategy = new CamelCaseNamingStrategy
{
OverrideSpecifiedNames = false
}
}
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
PropertyNameCaseInsensitive = false,
// To ignore comments or trailing commas, set these:
ReadCommentHandling = JsonCommentHandling.Disallow,
UnmappedMemberHandling = JsonUnmappedMemberHandling.Disallow,
AllowTrailingCommas = false,
};


/// <summary>
/// Custom JSON serializer for objects with additional properties
/// Custom JSON serializer options for objects with additional properties.
/// </summary>
public static readonly JsonSerializerSettings AdditionalPropertiesSerializerSettings = new JsonSerializerSettings
public static readonly JsonSerializerOptions AdditionalPropertiesSerializerOptions = new JsonSerializerOptions
{
// OpenAPI generated types generally hide default constructors.
ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor,
MissingMemberHandling = MissingMemberHandling.Ignore,
ContractResolver = new DefaultContractResolver
{
NamingStrategy = new CamelCaseNamingStrategy
{
OverrideSpecifiedNames = false
}
}
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
PropertyNameCaseInsensitive = false,

ReadCommentHandling = JsonCommentHandling.Disallow,
AllowTrailingCommas = false,

};

/// <summary>
Expand Down
5 changes: 2 additions & 3 deletions codegen/Templates/csharp/Configuration.mustache
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Text.Json.Serialization;

namespace Aspose.BarCode.Cloud.Sdk.Api
{
Expand Down Expand Up @@ -71,7 +70,7 @@ namespace Aspose.BarCode.Cloud.Sdk.Api
/// <summary>
/// Authentication type.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
[JsonConverter(typeof(JsonStringEnumConverter))]
public AuthType AuthType { get; private set; }

/// <summary>
Expand Down
5 changes: 2 additions & 3 deletions codegen/Templates/csharp/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ This repository contains Aspose.BarCode Cloud SDK for .NET source code. This SDK

Aspose.BarCode Cloud SDK for .NET provides cross-platform bindings for:

- .NET 5 and higher
- .NET 8 and higher
- .NET Standard 2.0 and higher
- .NET Core 3.1 and higher
- .NET Framework 4.6.2 and higher

To use these SDKs, you will need Client Id and Client Secret which can be looked up at [Aspose Cloud Dashboard](https://dashboard.aspose.cloud/applications) (free registration in Aspose Cloud is required for this).
Expand Down Expand Up @@ -82,7 +81,7 @@ The examples below show how you can generate QR code and save it into local file

## Dependencies

- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/)
- [System.Text.Json](https://www.nuget.org/packages/System.Text.json)

## Licensing

Expand Down
5 changes: 2 additions & 3 deletions codegen/Templates/csharp/model.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ using Aspose.BarCode.Cloud.Sdk.Interfaces;
using Aspose.BarCode.Cloud.Sdk.Internal;
{{/isEnum}}
{{#isEnum}}
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Text.Json.Serialization;
{{/isEnum}}

namespace {{packageName}}.Model
Expand All @@ -19,7 +18,7 @@ namespace {{packageName}}.Model
/// <summary>
/// {{description}}
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum {{classname}}{{#parent}} : {{{parent}}}{{/parent}}
{ {{#allowableValues}}{{#values}}
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion codegen/Templates/csharp/netcore_project.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Aspose.Barcode for Cloud allows you to control all aspects of the image and barc

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Text.Json" Version="9.0.4" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion codegen/Templates/csharp/netcore_testproject.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion codegen/Templates/nodejs/package.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"test": "npx jest",
"cover": "npx jest --coverage",
"lint": "npx eslint src test snippets",
"format": "npx eslint src test snippets --fix",
"format": "npx eslint src test snippets eslint.config.mjs --fix",
"prepare": "npx tsup",
"check-updates": "ncu -u --enginesNode"
},
Expand Down
2 changes: 1 addition & 1 deletion codegen/Templates/python/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This repository contains Aspose.BarCode Cloud SDK for Python source code. This S

Supported Python versions:

- Python 3.6+
- Python 3.7+

To use these SDKs, you will need Client Id and Client Secret which can be looked up at [Aspose Cloud Dashboard](https://dashboard.aspose.cloud/applications) (free registration in Aspose Cloud is required for this).

Expand Down
2 changes: 1 addition & 1 deletion codegen/config-android.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"androidSdkVersion": "33",
"apiPackage": "com.aspose.barcode.cloud.demo_app",
"artifactId": "Android Application for Barcode Processing in the Cloud via REST API",
"artifactVersion": "25.3.0",
"artifactVersion": "25.4.0",
"groupId": "com.aspose",
"invokerPackage": "com.aspose.barcode.cloud.demo_app",
"modelPackage": "com.aspose.barcode.cloud.demo_app.model"
Expand Down
2 changes: 1 addition & 1 deletion codegen/config-dart.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"browserClient": false,
"pubDescription": "This SDK allows you to work with Aspose.BarCode for Cloud REST APIs in your Dart or Flutter applications quickly and easily",
"pubName": "aspose_barcode_cloud",
"pubVersion": "4.25.3",
"pubVersion": "4.25.4",
"useEnumExtension": true
}
2 changes: 1 addition & 1 deletion codegen/config-go.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"packageName": "barcode",
"packageVersion": "4.2503.0"
"packageVersion": "4.2504.0"
}
2 changes: 1 addition & 1 deletion codegen/config-java.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"artifactDescription": "Aspose.BarCode Cloud SDK for Java",
"artifactId": "aspose-barcode-cloud",
"artifactUrl": "https://www.aspose.cloud",
"artifactVersion": "25.3.0",
"artifactVersion": "25.4.0",
"developerEmail": "denis.averin@aspose.com",
"developerName": "Denis Averin",
"developerOrganization": "Aspose",
Expand Down
2 changes: 1 addition & 1 deletion codegen/config-php.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"artifactVersion": "25.3.0",
"artifactVersion": "25.4.0",
"invokerPackage": "Aspose\\BarCode"
}
2 changes: 1 addition & 1 deletion codegen/config-python.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packageName": "aspose_barcode_cloud",
"packageUrl": "https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-python",
"packageVersion": "25.3.0",
"packageVersion": "25.4.0",
"projectName": "aspose-barcode-cloud"
}
4 changes: 2 additions & 2 deletions codegen/config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"artifactVersion": "23.7.0",
"npmName": "aspose-barcode-cloud-node",
"npmVersion": "25.3.0",
"npmVersion": "25.4.0",
"packageName": "Aspose.BarCode.Cloud.Sdk",
"packageVersion": "25.3.0",
"packageVersion": "25.4.0",
"supportsES6": true,
"targetFramework": "netstandard2.0"
}
Loading