@@ -25,7 +25,7 @@ private static void Main(string[] args)
2525
2626 private static void CompareOpenApiInfo ( string version , IList < Model > openApiInfoMetadata )
2727 {
28- HashSet < Model > models = new HashSet < Model > ( ) ;
28+ var models = new HashSet < Model > ( ) ;
2929 var newPathsAdded = new HashSet < string > ( ) ;
3030 var openApiErrors = new HashSet < string > ( ) ;
3131 newPathsAdded . Add ( "Module,Path,Method" ) ;
@@ -55,29 +55,26 @@ private static void CompareOpenApiInfo(string version, IList<Model> openApiInfoM
5555 {
5656 throw new Exception ( $ "Error reading openapi file { file } ") ;
5757 }
58-
58+
5959 //Go through each path in the openapi file
6060 foreach ( var path in openApiDoc . Paths )
6161 {
62-
63-
64-
6562 //Go through each operation in the path
6663 foreach ( var operation in path . Value . Operations )
6764 {
68- var model = new Model ( ) ;
69-
70- var pathInfo = new PathInfo ( ) ;
71- //Get the path key
72- var apiPath = path . Key ;
73- pathInfo . Path = apiPath ;
74- pathInfo . Module = fileName ;
75- model . PathInfo = pathInfo ;
65+ var model = new Model ( ) ;
66+
67+ var pathInfo = new PathInfo ( ) ;
68+ //Get the path key
69+ var apiPath = path . Key ;
70+ pathInfo . Path = apiPath ;
71+ pathInfo . Module = fileName ;
72+ model . PathInfo = pathInfo ;
7673 var methodInfo = new MethodInfo ( ) ;
7774 //Get the operationId
7875 var operationId = operation . Value . OperationId ;
7976 methodInfo . OperationId = operationId . ToString ( ) ;
80-
77+
8178 //Get the method
8279 var method = operation . Key . ToString ( ) ;
8380 methodInfo . Method = method . ToString ( ) ;
@@ -109,13 +106,13 @@ private static void CompareOpenApiInfo(string version, IList<Model> openApiInfoM
109106 {
110107 openApiErrors . Add ( $ "{ fileName } ,{ apiPath } , { method } ,OperationId changed from: { originalPathDetails . MethodInfo . OperationId } , OperationId changed to: { methodInfo . OperationId } ") ;
111108 }
112-
109+
113110 models . Add ( model ) ;
114-
111+
115112 }
116-
117-
118-
113+
114+
115+
119116 }
120117 }
121118 }
0 commit comments