You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|buildTarget|Target to build an application or library|<dl><dt>**program**</dt><dd>Generate code for a standalone server</dd><dt>**library**</dt><dd>Generate code for a server abstract class library</dd></dl>|program|
23
+
|centralizedPackageVersionManagement|Option to control the usage of centralized package version management. https://devblogs.microsoft.com/nuget/introducing-central-package-management/#disabling-central-package-management|<dl><dt>**optout**</dt><dd>Opt out of centralized package version management. Set this if you have a Directory.Packages.pros file but want this project to ignore it.</dd><dt>**default**</dt><dd>Property in project won't be used</dd><dt>**enable**</dt><dd>Centralized package version management will be used</dd></dl>|null|
23
24
|classModifier|Class Modifier for controller classes: Empty string or abstract.|||
@@ -91,6 +98,7 @@ public class AspNetServerCodegen extends AbstractCSharpCodegen {
91
98
privatebooleanuseNewtonsoft = true;
92
99
privatebooleanuseDefaultRouting = true;
93
100
privateStringnewtonsoftVersion = "3.0.0";
101
+
privateCliOptioncentralizedPackageVersionManagement = newCliOption(CENTRALIZED_PACKAGE_VERSION_MANAGEMENT, "Option to control the usage of centralized package version management. https://devblogs.microsoft.com/nuget/introducing-central-package-management/#disabling-central-package-management");
94
102
95
103
publicAspNetServerCodegen() {
96
104
super();
@@ -249,6 +257,7 @@ public AspNetServerCodegen() {
249
257
"Uses the Newtonsoft JSON library.",
250
258
useNewtonsoft);
251
259
260
+
252
261
addOption(NEWTONSOFT_VERSION,
253
262
"Version for Microsoft.AspNetCore.Mvc.NewtonsoftJson for ASP.NET Core 3.0+",
254
263
newtonsoftVersion);
@@ -301,13 +310,24 @@ public AspNetServerCodegen() {
centralizedPackageVersionManagementOptions.put(DEFAULT, "Property in project won't be used");
320
+
centralizedPackageVersionManagementOptions.put(ENABLE, "Centralized package version management will be used");
321
+
centralizedPackageVersionManagementOptions.put(OPTOUT, "Opt out of centralized package version management. Set this if you have a Directory.Packages.pros file but want this project to ignore it.");
thrownewRuntimeException("Invalid value `" + additionalProperties.get(CENTRALIZED_PACKAGE_VERSION_MANAGEMENT) + "` for the option `centralizedPackageVersionManagement`. Please refer to the documentation for more information.");
0 commit comments