File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Atc.Rest.ApiGenerator.Framework.Minimal/ProjectGenerator
Atc.Rest.ApiGenerator.Framework.Mvc/ProjectGenerator Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -108,15 +108,18 @@ public void ScaffoldHandlers()
108108 var apiGroupName = urlPath . GetApiGroupName ( ) ;
109109
110110 var handlersLocation = LocationFactory . CreateWithApiGroupName ( apiGroupName , settings . HandlersLocation ) ;
111- var contractsLocation = LocationFactory . CreateWithApiGroupName ( apiGroupName , settings . ContractsLocation ) ;
112111
113112 var fullNamespace = NamespaceFactory . Create ( settings . ProjectName , handlersLocation ) ;
114113
115114 foreach ( var openApiOperation in urlPath . Value . Operations )
116115 {
116+ if ( openApiOperation . Value . Deprecated && ! settings . IncludeDeprecatedOperations )
117+ {
118+ continue ;
119+ }
120+
117121 var classParameters = ContentGeneratorServerHandlerParametersFactory . Create (
118122 fullNamespace ,
119- $ "Api.Generated.{ contractsLocation } ", // TODO: Fix this
120123 urlPath . Value ,
121124 openApiOperation . Value ) ;
122125
Original file line number Diff line number Diff line change @@ -97,6 +97,11 @@ public void ScaffoldHandlers()
9797
9898 foreach ( var openApiOperation in urlPath . Value . Operations )
9999 {
100+ if ( openApiOperation . Value . Deprecated && ! settings . IncludeDeprecatedOperations )
101+ {
102+ continue ;
103+ }
104+
100105 var classParameters = ContentGeneratorServerHandlerParametersFactory . Create (
101106 fullNamespace ,
102107 urlPath . Value ,
You can’t perform that action at this time.
0 commit comments