Skip to content
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

Remove swagger2 #1383

Merged
merged 1 commit into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ protected boolean initProcedure() {

ContextHandlerCollection contexts = new ContextHandlerCollection();
ServletContextHandler mainHandler = new ServletContextHandler(contexts, APIDOC_PATH, true, false);
mainHandler.addServlet(restServletHolder, "/swagger2/apis/*");
mainHandler.addServlet(restServletHolder, "/openapi3/apis/*");

addStaticResources(mainHandler, "/explorer", "static-content");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,50 +12,32 @@

public class SwaggerLightyRFC8040Test extends SwaggerLightyTest {

private static final String SWAGGER2_BASE_URI = "http://localhost:8888/apidoc/swagger2/apis";
private static final String OPENAPI3_BASE_URI = "http://localhost:8888/apidoc/openapi3/apis";

@Test
public void simpleSwaggerModuleTest() {
super.simpleSwaggerModuleTest();
}

@Test
public void testGetListOfMountsSwagger2() {
super.testGetListOfMounts(mockUriInfo(SWAGGER2_BASE_URI + "/mounts"));
}

@Test
public void testGetListOfMountsOpenApi3() {
super.testGetListOfMounts(mockUriInfo(OPENAPI3_BASE_URI + "/mounts"));
}

@Test
public void testGetAllModulesDocSwagger2() {
super.testGetAllModulesDoc(mockUriInfo(SWAGGER2_BASE_URI + "/single"));
}

@Test
public void testGetAllModulesDocOpenApi3() {
super.testGetAllModulesDoc(mockUriInfo(OPENAPI3_BASE_URI + "/single"));
}

@Test
public void testGetDocByModuleSwagger2() {
String path = SWAGGER2_BASE_URI + "/" + DEFAULT_MODEL_NAME + "(" + DEFAULT_REVISION_DATE + ")";
super.testGetDocByModule(mockUriInfo(path), DEFAULT_MODEL_NAME, DEFAULT_REVISION_DATE);
}

@Test
public void testGetDocByModuleOpenApi3() {
String path = OPENAPI3_BASE_URI + "/" + DEFAULT_MODEL_NAME + "(" + DEFAULT_REVISION_DATE + ")";
super.testGetDocByModule(mockUriInfo(path), DEFAULT_MODEL_NAME, DEFAULT_REVISION_DATE);
}

@Test
public void testGetApiExplorerSwagger2() {
super.testGetApiExplorer(mockUriInfo(SWAGGER2_BASE_URI + "/ui"));
}

@Test
public void testGetApiExplorerOpenApi3() {
Expand Down
Loading