File tree Expand file tree Collapse file tree 4 files changed +101
-0
lines changed
java/org/openapitools/openapidiff/core/backcompat Expand file tree Collapse file tree 4 files changed +101
-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 PathBCTest {
10
+ private final String BASE = "bc_path_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_path_changed_but_compatible.yaml" );
20
+ }
21
+
22
+ @ Test
23
+ public void opsDecreased () {
24
+ assertOpenApiBackwardIncompatible (BASE , "bc_path_ops_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
+ post :
18
+ operationId : widgetCreate
19
+ responses :
20
+ ' 200 ' :
21
+ description : successful operation
22
+ content :
23
+ application/json :
24
+ schema :
25
+ 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
+ post :
18
+ operationId : widgetCreate
19
+ responses :
20
+ ' 200 ' :
21
+ description : successful operation
22
+ content :
23
+ application/json :
24
+ schema :
25
+ type : string
26
+ put :
27
+ operationId : widgetUpdate
28
+ responses :
29
+ ' 200 ' :
30
+ description : successful operation
31
+ content :
32
+ application/json :
33
+ schema :
34
+ 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