From 6f6f16663e1e8bb68bd17462bddd2322cfcec163 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Mon, 4 Mar 2024 06:47:41 -0800 Subject: [PATCH 1/2] feat(ts): support local const, function, type, fields and methods (box/box-codegen#441) --- .codegen.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codegen.json b/.codegen.json index dd6e466c..e52d4c2e 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "332479b", "specHash": "b2f7568", "version": "0.1.0" } +{ "engineHash": "1ec6b5f", "specHash": "b2f7568", "version": "0.1.0" } From 266c4894e0344211c2594d818625d2c10d1e2fc6 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Mon, 4 Mar 2024 06:48:55 -0800 Subject: [PATCH 2/2] feat: Support version in generate script (box/box-codegen#418) --- .codegen.json | 2 +- .versionrc | 34 +++++++++++++++++++++++++++++ Box.Sdk.Gen/Box.Sdk.Gen.csproj | 2 +- Box.Sdk.Gen/Networking/SdkConsts.cs | 3 +-- Box.Sdk.Gen/Networking/Version.cs | 9 ++++++++ 5 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 .versionrc create mode 100644 Box.Sdk.Gen/Networking/Version.cs diff --git a/.codegen.json b/.codegen.json index e52d4c2e..390da8aa 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "1ec6b5f", "specHash": "b2f7568", "version": "0.1.0" } +{ "engineHash": "be0f8b2", "specHash": "b2f7568", "version": "0.1.0" } diff --git a/.versionrc b/.versionrc new file mode 100644 index 00000000..ca2ea307 --- /dev/null +++ b/.versionrc @@ -0,0 +1,34 @@ +{ + "types": [ + { + "type": "feat", + "section": "New Features and Enhancements", + "hidden": false + }, + { + "type": "fix", + "section": "Bug Fixes", + "hidden": false + }, + { + "type": "chore", + "hidden": true + }, + { + "type": "docs", + "hidden": true + }, + { + "type": "style", + "hidden": true + }, + { + "type": "refactor", + "hidden": true + }, + { + "type": "test", + "hidden": true + } + ] +} diff --git a/Box.Sdk.Gen/Box.Sdk.Gen.csproj b/Box.Sdk.Gen/Box.Sdk.Gen.csproj index d852ff54..2443b98e 100644 --- a/Box.Sdk.Gen/Box.Sdk.Gen.csproj +++ b/Box.Sdk.Gen/Box.Sdk.Gen.csproj @@ -2,7 +2,7 @@ net6.0 - 2.0.0 + 0.1.0 [Box Platform](https://box.dev) provides functionality to provide access to content stored within [Box](https://box.com). It provides endpoints for basic manipulation of files and folders, management of users within an enterprise, as well as more complex topics such as legal holds and retention policies. Apache-2.0 enable diff --git a/Box.Sdk.Gen/Networking/SdkConsts.cs b/Box.Sdk.Gen/Networking/SdkConsts.cs index 6c9e5252..7a97acc6 100644 --- a/Box.Sdk.Gen/Networking/SdkConsts.cs +++ b/Box.Sdk.Gen/Networking/SdkConsts.cs @@ -4,10 +4,9 @@ namespace Fetch { internal static class SdkConsts { - static string SdkVersion = "0.1.0"; static string RunTimeVersion = System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription; - static KeyValuePair UserAgentHeader = new KeyValuePair("User-Agent", $"box-dotnet-generated-sdk/{SdkVersion}"); + static KeyValuePair UserAgentHeader = new KeyValuePair("User-Agent", $"box-dotnet-generated-sdk/{Version.sdkVersion}"); static KeyValuePair BoxUAHeader = new KeyValuePair("X-Box-UA", $"agent={UserAgentHeader.Value}; env=dotnet/{RunTimeVersion}"); internal static List> AnalyticsHeaders = new List>() { UserAgentHeader, BoxUAHeader }; diff --git a/Box.Sdk.Gen/Networking/Version.cs b/Box.Sdk.Gen/Networking/Version.cs new file mode 100644 index 00000000..c02a655d --- /dev/null +++ b/Box.Sdk.Gen/Networking/Version.cs @@ -0,0 +1,9 @@ +using System; + +namespace Fetch +{ + public static class Version + { + public static string sdkVersion = "0.1.0"; + } +}