Skip to content

Commit 98d71f9

Browse files
committed
obsoleteAttribute on data model class, class properties/fields and API functions are all copied.
1 parent 1e2442d commit 98d71f9

File tree

10 files changed

+29
-0
lines changed

10 files changed

+29
-0
lines changed

DemoCoreWeb.ClientApi/WebApiClientAuto.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9802,6 +9802,7 @@ public enum MedicalContraindiationResponseTypeTypeCode
98029802
T,
98039803
}
98049804

9805+
[System.ObsoleteAttribute("Type deprecated for testing")]
98059806
[System.Runtime.Serialization.DataContract(Namespace="http://fonlowdemo.com/2020/09")]
98069807
[System.SerializableAttribute()]
98079808
public class MimsPackage : object

DemoCoreWeb/Scripts/ClientApi/WebApiCoreJQClientAuto.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,6 +1749,8 @@ namespace DemoWebApi_DemoData_Client {
17491749

17501750
export enum MedicalContraindiationResponseTypeTypeCode { P = "P", T = "Tt" }
17511751

1752+
1753+
/** @deprecated Type deprecated for testing */
17521754
export interface MimsPackage {
17531755

17541756
/**

DemoWebApi.DemoDataCore/Entities.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ public class MimsResult<T>
320320
public string Message { get; set; }
321321
}
322322

323+
[Obsolete("Type deprecated for testing")]
323324
[DataContract(Namespace = Constants.DataNamespace)]
324325
public class MimsPackage
325326
{

Fonlow.Poco2TsCore/Poco2TsGen.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,13 @@ void CreateTypeDocComment(Type type, CodeTypeDeclaration typeDeclaration)
141141
typeDeclaration.Comments.Add(new CodeCommentStatement(StringFunctions.IndentedArrayToString(docComment.summary.Text), true));
142142
}
143143
}
144+
145+
146+
var obsoleteAttribute = type.GetCustomAttribute<ObsoleteAttribute>();
147+
if (obsoleteAttribute != null)
148+
{
149+
typeDeclaration.Comments.Add(new CodeCommentStatement(AnnotationCommentGenerator.GenerateComments(obsoleteAttribute), true));
150+
}
144151
}
145152

146153
/// <summary>

HeroesDemo/src/clientapi/WebApiCoreNG2FormGroupClientAuto.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2085,6 +2085,8 @@ export namespace DemoWebApi_DemoData_Client {
20852085

20862086
export enum MedicalContraindiationResponseTypeTypeCode { P = "P", T = "Tt" }
20872087

2088+
2089+
/** @deprecated Type deprecated for testing */
20882090
export interface MimsPackage {
20892091

20902092
/**
@@ -2113,6 +2115,8 @@ export namespace DemoWebApi_DemoData_Client {
21132115
/** @deprecated Just for testing ~ Is Error. */
21142116
tagForTest3?: string | null;
21152117
}
2118+
2119+
/** @deprecated Type deprecated for testing */
21162120
export interface MimsPackageFormProperties {
21172121

21182122
/**

HeroesDemo/src/clientapi/WebApiCoreNg2ClientAuto.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,6 +1759,8 @@ export namespace DemoWebApi_DemoData_Client {
17591759

17601760
export enum MedicalContraindiationResponseTypeTypeCode { P = "P", T = "Tt" }
17611761

1762+
1763+
/** @deprecated Type deprecated for testing */
17621764
export interface MimsPackage {
17631765

17641766
/**

WebApiClientGenCore.Abstract/Poco2CsGen.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,12 @@ CodeTypeDeclaration TypeToCodeTypeDeclaration(Type type, CodeNamespaceEx clientN
293293
}
294294
}
295295

296+
var obsoleteAttribute = type.GetCustomAttribute<ObsoleteAttribute>();
297+
if (obsoleteAttribute != null)
298+
{
299+
typeDeclaration.CustomAttributes.Add(AnnotationDeclarationGenerator.CreateDeclaration(obsoleteAttribute));
300+
}
301+
296302
CreateTypeDocComment(type, typeDeclaration);
297303

298304
CherryPickingMethods typeCherryMethods = CherryPicking.GetTypeCherryMethods(type);

aurelia/src/clientapi/WebApiCoreAureliaClientAuto.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,6 +1758,8 @@ export namespace DemoWebApi_DemoData_Client {
17581758

17591759
export enum MedicalContraindiationResponseTypeTypeCode { P = "P", T = "Tt" }
17601760

1761+
1762+
/** @deprecated Type deprecated for testing */
17611763
export interface MimsPackage {
17621764

17631765
/**

axios/src/clientapi/WebApiCoreAxiosClientAuto.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,6 +1749,8 @@ export namespace DemoWebApi_DemoData_Client {
17491749

17501750
export enum MedicalContraindiationResponseTypeTypeCode { P = "P", T = "Tt" }
17511751

1752+
1753+
/** @deprecated Type deprecated for testing */
17521754
export interface MimsPackage {
17531755

17541756
/**

fetchapi/src/clientapi/WebApiCoreFetchClientAuto.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,6 +1747,8 @@ export namespace DemoWebApi_DemoData_Client {
17471747

17481748
export enum MedicalContraindiationResponseTypeTypeCode { P = "P", T = "Tt" }
17491749

1750+
1751+
/** @deprecated Type deprecated for testing */
17501752
export interface MimsPackage {
17511753

17521754
/**

0 commit comments

Comments
 (0)