@@ -51,25 +51,25 @@ static async Task Main(string[] args)
5151 _schemaDefinitionsInMultipleGroups = _schemaToNameMap . Values . Select ( x =>
5252 {
5353 var parts = x . Split ( "." ) ;
54- return new { FullName = x , Name = parts [ parts . Length - 1 ] , Version = parts [ parts . Length - 2 ] , Group = parts [ parts . Length - 3 ] } ;
54+ return new { FullName = x , Name = parts [ parts . Length - 1 ] , Version = parts [ parts . Length - 2 ] , Group = parts [ parts . Length - 3 ] } ;
5555 } )
56- . GroupBy ( x => new { x . Name , x . Version } )
56+ . GroupBy ( x => new { x . Name , x . Version } )
5757 . Where ( x => x . Count ( ) > 1 )
5858 . SelectMany ( x => x )
5959 . Select ( x => x . FullName )
6060 . ToHashSet ( ) ;
6161
6262 _classNameToPluralMap = swagger . Operations
6363 . Where ( x => x . Operation . OperationId . StartsWith ( "list" ) )
64- . Select ( x => { return new { PluralName = x . Path . Split ( "/" ) . Last ( ) , ClassName = GetClassNameForSchemaDefinition ( x . Operation . Responses [ "200" ] . ActualResponseSchema ) } ; } )
64+ . Select ( x => { return new { PluralName = x . Path . Split ( "/" ) . Last ( ) , ClassName = GetClassNameForSchemaDefinition ( x . Operation . Responses [ "200" ] . ActualResponseSchema ) } ; } )
6565 . Distinct ( )
6666 . ToDictionary ( x => x . ClassName , x => x . PluralName ) ;
6767
6868 // dictionary only contains "list" plural maps. assign the same plural names to entities those lists support
6969 _classNameToPluralMap = _classNameToPluralMap
7070 . Where ( x => x . Key . EndsWith ( "List" ) )
7171 . Select ( x =>
72- new { ClassName = x . Key . Remove ( x . Key . Length - 4 ) , PluralName = x . Value } )
72+ new { ClassName = x . Key . Remove ( x . Key . Length - 4 ) , PluralName = x . Value } )
7373 . ToDictionary ( x => x . ClassName , x => x . PluralName )
7474 . Union ( _classNameToPluralMap )
7575 . ToDictionary ( x => x . Key , x => x . Value ) ;
@@ -119,7 +119,7 @@ static async Task Main(string[] args)
119119
120120 var modelsDir = Path . Combine ( outputDirectory , "Models" ) ;
121121 _classesWithValidation = Directory . EnumerateFiles ( modelsDir )
122- . Select ( x => new { Class = Path . GetFileNameWithoutExtension ( x ) , Content = File . ReadAllText ( x ) } )
122+ . Select ( x => new { Class = Path . GetFileNameWithoutExtension ( x ) , Content = File . ReadAllText ( x ) } )
123123 . Where ( x => x . Content . Contains ( "public virtual void Validate()" ) )
124124 . Select ( x => x . Class )
125125 . ToHashSet ( ) ;
@@ -244,7 +244,7 @@ static string GetInterfaceName(JsonSchema4 definition)
244244 interfaces . Add ( $ "ISpec<{ GetClassNameForSchemaDefinition ( specProperty . Reference ) } >") ;
245245 }
246246
247- if ( _classesWithValidation . Contains ( className ) )
247+ if ( _classesWithValidation . Contains ( className ) )
248248 interfaces . Add ( "IValidate" ) ;
249249 var result = string . Join ( ", " , interfaces ) ;
250250 return result ;
@@ -272,7 +272,7 @@ static void GetPlural(RenderContext context, IList<object> arguments, IDictionar
272272 if ( arguments != null && arguments . Count > 0 && arguments [ 0 ] != null && arguments [ 0 ] is JsonSchema4 )
273273 {
274274 var plural = GetPlural ( arguments [ 0 ] as JsonSchema4 ) ;
275- if ( plural != null )
275+ if ( plural != null )
276276 context . Write ( $ "\" { plural } \" ") ;
277277 else
278278 context . Write ( "null" ) ;
0 commit comments