Skip to content

Commit 2aeceac

Browse files
committed
Failing test for #412
1 parent d6383f3 commit 2aeceac

File tree

3 files changed

+71
-0
lines changed

3 files changed

+71
-0
lines changed

core/src/test/java/org/openapitools/openapidiff/core/RequestDiffTest.java

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.openapitools.openapidiff.core;
22

3+
import static org.openapitools.openapidiff.core.TestUtils.assertOpenApiBackwardIncompatible;
34
import static org.openapitools.openapidiff.core.TestUtils.assertOpenApiChangedEndpoints;
45

56
import org.junit.jupiter.api.Test;
@@ -12,4 +13,9 @@ public class RequestDiffTest {
1213
public void testDiffDifferent() {
1314
assertOpenApiChangedEndpoints(OPENAPI_DOC1, OPENAPI_DOC2);
1415
}
16+
17+
@Test
18+
public void issue412() {
19+
assertOpenApiBackwardIncompatible("issue-412_1.yaml", "issue-412_2.yaml");
20+
}
1521
}
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
openapi: "3.0.1"
2+
info:
3+
title: "Public Api"
4+
description: ""
5+
version: "2022-08-23T16:17:54Z"
6+
servers:
7+
- url: "https://someurl"
8+
variables:
9+
basePath:
10+
default: "/v1"
11+
paths:
12+
/auth:
13+
post:
14+
requestBody:
15+
content:
16+
application/json:
17+
schema:
18+
$ref: "#/components/schemas/AuthRequest"
19+
required: true
20+
responses:
21+
200:
22+
description: OK
23+
components:
24+
schemas:
25+
AuthRequest:
26+
required:
27+
- "Username"
28+
- "Password"
29+
type: "object"
30+
properties:
31+
Username:
32+
type: "string"
33+
Password:
34+
type: "string"
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
openapi: "3.0.1"
2+
info:
3+
title: "Public Api"
4+
description: ""
5+
version: "2022-08-23T16:17:54Z"
6+
servers:
7+
- url: "https://someurl"
8+
variables:
9+
basePath:
10+
default: "/v1"
11+
paths:
12+
/auth:
13+
post:
14+
requestBody:
15+
content:
16+
application/json:
17+
schema:
18+
$ref: "#/components/schemas/AuthRequest"
19+
required: true
20+
responses:
21+
200:
22+
description: OK
23+
components:
24+
schemas:
25+
AuthRequest:
26+
required:
27+
- "Username"
28+
type: "object"
29+
properties:
30+
Username:
31+
type: "string"

0 commit comments

Comments
 (0)