Skip to content

Commit

Permalink
Add test case for sanitizing unresolved spec
Browse files Browse the repository at this point in the history
  • Loading branch information
TharmiganK committed Dec 13, 2024
1 parent 68bc7f0 commit 1d5b3b0
Show file tree
Hide file tree
Showing 3 changed files with 3,799 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,16 @@ public void testSanitizeCmdWithComposedSchema() throws IOException {
compareFiles(expectedFilePath, tmpDir.resolve("sanitized_openapi.json"));
}

@Test(description = "Test openapi sanitize sub command with unresolved parameter schema")
public void testSanitizeCmdWithUnresolvedParameterSchema() throws IOException {
Path expectedFilePath = resourceDir.resolve(Paths.get("cmd/sanitize/sanitized_openapi_unresolved_expected.yaml"));
String[] args = {"-i", resourceDir + "/cmd/sanitize/openapi_unresolved.yaml", "-o", tmpDir.toString()};
Sanitize sanitize = new Sanitize();
new CommandLine(sanitize).parseArgs(args);
sanitize.execute();
compareFiles(expectedFilePath, tmpDir.resolve("sanitized_openapi.yaml"));
}

@AfterTest
public void clean() {
System.setErr(null);
Expand Down
Loading

0 comments on commit 1d5b3b0

Please sign in to comment.