17
17
import java .util .Map ;
18
18
import java .util .Optional ;
19
19
import java .util .stream .Collectors ;
20
- import lombok .Getter ;
21
20
import org .slf4j .Logger ;
22
21
import org .slf4j .LoggerFactory ;
23
22
24
- @ Getter
25
23
public class OpenApiDiff {
26
-
27
24
public static final String SWAGGER_VERSION_V2 = "2.0" ;
28
-
29
25
private static final Logger logger = LoggerFactory .getLogger (OpenApiDiff .class );
30
-
31
26
private PathsDiff pathsDiff ;
32
27
private PathDiff pathDiff ;
33
28
private SchemaDiff schemaDiff ;
@@ -47,7 +42,6 @@ public class OpenApiDiff {
47
42
private OAuthFlowDiff oAuthFlowDiff ;
48
43
private ExtensionsDiff extensionsDiff ;
49
44
private MetadataDiff metadataDiff ;
50
-
51
45
private final OpenAPI oldSpecOpenApi ;
52
46
private final OpenAPI newSpecOpenApi ;
53
47
private List <Endpoint > newEndpoints ;
@@ -132,7 +126,6 @@ private void setChangedExtension(ChangedExtensions changedExtension) {
132
126
133
127
private void preProcess (OpenAPI openApi ) {
134
128
List <SecurityRequirement > securityRequirements = openApi .getSecurity ();
135
-
136
129
if (securityRequirements != null ) {
137
130
List <SecurityRequirement > distinctSecurityRequirements =
138
131
securityRequirements .stream ().distinct ().collect (Collectors .toList ());
@@ -171,4 +164,104 @@ private ChangedOpenApi getChangedOpenApi() {
171
164
.setChangedOperations (changedOperations )
172
165
.setChangedExtensions (changedExtensions );
173
166
}
167
+
168
+ public PathsDiff getPathsDiff () {
169
+ return this .pathsDiff ;
170
+ }
171
+
172
+ public PathDiff getPathDiff () {
173
+ return this .pathDiff ;
174
+ }
175
+
176
+ public SchemaDiff getSchemaDiff () {
177
+ return this .schemaDiff ;
178
+ }
179
+
180
+ public ContentDiff getContentDiff () {
181
+ return this .contentDiff ;
182
+ }
183
+
184
+ public ParametersDiff getParametersDiff () {
185
+ return this .parametersDiff ;
186
+ }
187
+
188
+ public ParameterDiff getParameterDiff () {
189
+ return this .parameterDiff ;
190
+ }
191
+
192
+ public RequestBodyDiff getRequestBodyDiff () {
193
+ return this .requestBodyDiff ;
194
+ }
195
+
196
+ public ResponseDiff getResponseDiff () {
197
+ return this .responseDiff ;
198
+ }
199
+
200
+ public HeadersDiff getHeadersDiff () {
201
+ return this .headersDiff ;
202
+ }
203
+
204
+ public HeaderDiff getHeaderDiff () {
205
+ return this .headerDiff ;
206
+ }
207
+
208
+ public ApiResponseDiff getApiResponseDiff () {
209
+ return this .apiResponseDiff ;
210
+ }
211
+
212
+ public OperationDiff getOperationDiff () {
213
+ return this .operationDiff ;
214
+ }
215
+
216
+ public SecurityRequirementsDiff getSecurityRequirementsDiff () {
217
+ return this .securityRequirementsDiff ;
218
+ }
219
+
220
+ public SecurityRequirementDiff getSecurityRequirementDiff () {
221
+ return this .securityRequirementDiff ;
222
+ }
223
+
224
+ public SecuritySchemeDiff getSecuritySchemeDiff () {
225
+ return this .securitySchemeDiff ;
226
+ }
227
+
228
+ public OAuthFlowsDiff getOAuthFlowsDiff () {
229
+ return this .oAuthFlowsDiff ;
230
+ }
231
+
232
+ public OAuthFlowDiff getOAuthFlowDiff () {
233
+ return this .oAuthFlowDiff ;
234
+ }
235
+
236
+ public ExtensionsDiff getExtensionsDiff () {
237
+ return this .extensionsDiff ;
238
+ }
239
+
240
+ public MetadataDiff getMetadataDiff () {
241
+ return this .metadataDiff ;
242
+ }
243
+
244
+ public OpenAPI getOldSpecOpenApi () {
245
+ return this .oldSpecOpenApi ;
246
+ }
247
+
248
+ public OpenAPI getNewSpecOpenApi () {
249
+ return this .newSpecOpenApi ;
250
+ }
251
+
252
+ public List <Endpoint > getNewEndpoints () {
253
+ return this .newEndpoints ;
254
+ }
255
+
256
+ public List <Endpoint > getMissingEndpoints () {
257
+ return this .missingEndpoints ;
258
+ }
259
+
260
+ public List <ChangedOperation > getChangedOperations () {
261
+ return this .changedOperations ;
262
+ }
263
+
264
+ public ChangedExtensions getChangedExtensions () {
265
+ return this .changedExtensions ;
266
+ }
174
267
}
0 commit comments