@@ -156,23 +156,20 @@ public ApiDescription Clone()
156156
157157 extension ( ApiRequestFormat requestFormat )
158158 {
159- internal ApiRequestFormat Clone ( )
159+ internal ApiRequestFormat Clone ( ) => new ( )
160160 {
161- return new ( )
162- {
163- Formatter = requestFormat . Formatter ,
164- MediaType = requestFormat . MediaType ,
165- } ;
166- }
161+ Formatter = requestFormat . Formatter ,
162+ MediaType = requestFormat . MediaType ,
163+ } ;
167164 }
168165
169166 extension ( ApiResponseType responseType )
170167 {
171-
172168 internal ApiResponseType Clone ( )
173169 {
174170 var clone = new ApiResponseType ( )
175171 {
172+ Description = responseType . Description ,
176173 IsDefaultResponse = responseType . IsDefaultResponse ,
177174 ModelMetadata = responseType . ModelMetadata ,
178175 StatusCode = responseType . StatusCode ,
@@ -185,30 +182,24 @@ internal ApiResponseType Clone()
185182 }
186183 }
187184
188- private static ApiParameterDescription Clone ( ApiParameterDescription parameterDescription )
185+ private static ApiParameterDescription Clone ( ApiParameterDescription parameterDescription ) => new ( )
189186 {
190- return new ( )
191- {
192- BindingInfo = parameterDescription . BindingInfo ,
193- IsRequired = parameterDescription . IsRequired ,
194- DefaultValue = parameterDescription . DefaultValue ,
195- ModelMetadata = parameterDescription . ModelMetadata ,
196- Name = parameterDescription . Name ,
197- ParameterDescriptor = parameterDescription . ParameterDescriptor ,
198- RouteInfo = parameterDescription . RouteInfo ,
199- Source = parameterDescription . Source ,
200- Type = parameterDescription . Type ,
201- } ;
202- }
203-
204- private static ApiResponseFormat Clone ( ApiResponseFormat responseFormat )
187+ BindingInfo = parameterDescription . BindingInfo ,
188+ IsRequired = parameterDescription . IsRequired ,
189+ DefaultValue = parameterDescription . DefaultValue ,
190+ ModelMetadata = parameterDescription . ModelMetadata ,
191+ Name = parameterDescription . Name ,
192+ ParameterDescriptor = parameterDescription . ParameterDescriptor ,
193+ RouteInfo = parameterDescription . RouteInfo ,
194+ Source = parameterDescription . Source ,
195+ Type = parameterDescription . Type ,
196+ } ;
197+
198+ private static ApiResponseFormat Clone ( ApiResponseFormat responseFormat ) => new ( )
205199 {
206- return new ( )
207- {
208- Formatter = responseFormat . Formatter ,
209- MediaType = responseFormat . MediaType ,
210- } ;
211- }
200+ Formatter = responseFormat . Formatter ,
201+ MediaType = responseFormat . MediaType ,
202+ } ;
212203
213204 private static void CloneList < T > ( IList < T > source , IList < T > destintation , Func < T , T > clone )
214205 {
0 commit comments