Skip to content

bugfix (to master): after openapi specs comparison, all parameters are removed #454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test fix: path_5.yaml and path_6.yaml identical so their compare resu…
…lt should yield not issues.
  • Loading branch information
justinas.bardauskas committed Jan 11, 2023
commit 2cdb8375d3abc104a4c7350969e332b4a0c4a610
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.fail;
import static org.openapitools.openapidiff.core.TestUtils.assertOpenApiAreEquals;

import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -42,13 +41,8 @@ public void testSameTemplateDifferentMethods() {
@Test
public void testDiffWithSimilarBeginningPaths() {
ChangedOpenApi changedOpenApi = OpenApiCompare.fromLocations(OPENAPI_PATH5, OPENAPI_PATH6);
try {
ChangedOpenApi diff =
OpenApiCompare.fromSpecifications(
changedOpenApi.getOldSpecOpenApi(), changedOpenApi.getNewSpecOpenApi());
assertThat(diff.getChangedOperations()).hasSize(4);
} catch (IllegalArgumentException e) {
fail(e.getMessage());
}
ChangedOpenApi diff = OpenApiCompare.fromSpecifications(
changedOpenApi.getOldSpecOpenApi(), changedOpenApi.getNewSpecOpenApi());
assertThat(diff.getChangedOperations()).isEmpty();
}
}