File tree Expand file tree Collapse file tree 4 files changed +104
-0
lines changed
java/org/openapitools/openapidiff/core/backcompat Expand file tree Collapse file tree 4 files changed +104
-0
lines changed Original file line number Diff line number Diff line change
1
+ package org .openapitools .openapidiff .core .backcompat ;
2
+
3
+ import static org .openapitools .openapidiff .core .TestUtils .assertOpenApiBackwardIncompatible ;
4
+ import static org .openapitools .openapidiff .core .TestUtils .assertSpecChangedButCompatible ;
5
+ import static org .openapitools .openapidiff .core .TestUtils .assertSpecUnchanged ;
6
+
7
+ import org .junit .jupiter .api .Test ;
8
+
9
+ public class PathsBCTest {
10
+ private final String BASE = "bc_paths_base.yaml" ;
11
+
12
+ @ Test
13
+ public void unchanged () {
14
+ assertSpecUnchanged (BASE , BASE );
15
+ }
16
+
17
+ @ Test
18
+ public void changedButCompatible () {
19
+ assertSpecChangedButCompatible (BASE , "bc_paths_changed_but_compatible.yaml" );
20
+ }
21
+
22
+ @ Test
23
+ public void decreased () {
24
+ assertOpenApiBackwardIncompatible (BASE , "bc_paths_decreased.yaml" );
25
+ }
26
+ }
Original file line number Diff line number Diff line change
1
+ openapi : 3.0.0
2
+ info :
3
+ description : myDesc
4
+ title : myTitle
5
+ version : 1.0.0
6
+ paths :
7
+ /widgets :
8
+ get :
9
+ operationId : listWidgets
10
+ responses :
11
+ ' 200 ' :
12
+ description : successful operation
13
+ content :
14
+ application/json :
15
+ schema :
16
+ type : string
17
+ /widgets/{id} :
18
+ get :
19
+ operationId : getWidget
20
+ responses :
21
+ ' 200 ' :
22
+ description : successful operation
23
+ content :
24
+ application/json :
25
+ schema :
26
+ type : string
Original file line number Diff line number Diff line change
1
+ openapi : 3.0.0
2
+ info :
3
+ description : myDesc
4
+ title : myTitle
5
+ version : 1.0.0
6
+ paths :
7
+ /widgets :
8
+ get :
9
+ operationId : listWidgets
10
+ responses :
11
+ ' 200 ' :
12
+ description : successful operation
13
+ content :
14
+ application/json :
15
+ schema :
16
+ type : string
17
+ /widgets/{id} :
18
+ get :
19
+ operationId : getWidget
20
+ responses :
21
+ ' 200 ' :
22
+ description : successful operation
23
+ content :
24
+ application/json :
25
+ schema :
26
+ type : string
27
+ /widgets/{id}/status :
28
+ get :
29
+ operationId : getWidgetStatus
30
+ responses :
31
+ ' 200 ' :
32
+ description : successful operation
33
+ content :
34
+ application/json :
35
+ schema :
36
+ type : string
Original file line number Diff line number Diff line change
1
+ openapi : 3.0.0
2
+ info :
3
+ description : myDesc
4
+ title : myTitle
5
+ version : 1.0.0
6
+ paths :
7
+ /widgets :
8
+ get :
9
+ operationId : listWidgets
10
+ responses :
11
+ ' 200 ' :
12
+ description : successful operation
13
+ content :
14
+ application/json :
15
+ schema :
16
+ type : string
You can’t perform that action at this time.
0 commit comments