File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
core/src/test/java/org/openapitools/openapidiff/core Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -40,4 +40,32 @@ public void renderDoesNotFailWhenHTTPStatusCodeIsRange() {
40
40
render .render (diff , outputStreamWriter );
41
41
assertThat (outputStream .toString ()).isNotBlank ();
42
42
}
43
+
44
+ @ Test
45
+ public void validateAsciiDocChangeFile () {
46
+ AsciidocRender render = new AsciidocRender ();
47
+ ByteArrayOutputStream outputStream = new ByteArrayOutputStream ();
48
+ OutputStreamWriter outputStreamWriter = new OutputStreamWriter (outputStream );
49
+ ChangedOpenApi diff =
50
+ OpenApiCompare .fromLocations ("missing_property_1.yaml" , "missing_property_2.yaml" );
51
+ render .render (diff , outputStreamWriter );
52
+ assertThat (outputStream .toString ())
53
+ .isEqualTo (
54
+ "= TITLE (v 1.0.0)\n " +
55
+ ":reproducible:\n " +
56
+ ":sectlinks:\n " +
57
+ ":toc:\n " +
58
+ "\n " +
59
+ "== What's Changed\n " +
60
+ "=== GET /\n " +
61
+ "* Return Type:\n " +
62
+ "** Changed default \n " +
63
+ "** Media types:\n " +
64
+ "*** Changed application/json\n " +
65
+ "*** Schema:\n " +
66
+ "Backward compatible\n " +
67
+ "\n " +
68
+ "\n " +
69
+ "NOTE: API changes are backward compatible" );
70
+ }
43
71
}
You can’t perform that action at this time.
0 commit comments