Skip to content
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
1 change: 0 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ jobs:
- '**/node_modules/**'
- '**/webjars/**'
- '**/doc-maven-plugin/src/main/resources/js/**'
- '**/openapi-war-overlay/**/swagger-ui.js'

# --- Manual build (only used when build-mode is 'manual') -------------
# - name: Set up JDK 11
Expand Down
13 changes: 1 addition & 12 deletions commons/rest/json-resource-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
information: "Portions Copyright [year] [name of copyright owner]".

Copyright 2014-2016 ForgeRock AS.
Portions Copyrighted 2026 3A Systems, LLC.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -42,12 +43,6 @@
<groupId>org.openidentityplatform.commons</groupId>
<artifactId>json-resource-http</artifactId>
</dependency>
<dependency>
<groupId>org.openidentityplatform.commons</groupId>
<artifactId>openapi-war-overlay</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj</artifactId>
Expand Down Expand Up @@ -91,12 +86,6 @@
</goals>
<configuration>
<classifier>servlet</classifier>
<overlays>
<overlay>
<groupId>org.openidentityplatform.commons</groupId>
<artifactId>openapi-war-overlay</artifactId>
</overlay>
</overlays>
</configuration>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import org.forgerock.http.routing.RouteMatchers;
import org.forgerock.http.routing.RoutingMode;
import org.forgerock.http.swagger.SwaggerApiProducer;
import org.forgerock.http.util.Uris;
import org.forgerock.json.resource.MemoryBackend;
import org.forgerock.json.resource.ResourcePath;
import org.forgerock.json.resource.Router;
Expand All @@ -65,8 +64,6 @@
*/
public class CrestHttpApplication implements DescribedHttpApplication {

private static final String SWAGGER_JSON_ROUTE = "../..?_api";

private static final ContentTypeHeader HTML_CONTENT_TYPE_HEADER =
ContentTypeHeader.valueOf("text/html; charset=UTF-8");

Expand Down Expand Up @@ -119,24 +116,7 @@ public Promise<Response, NeverThrowsException> handle(Context context, Request r
}
});

// redirect to Swagger UI page, given a URL parameter to point to the Swagger JSON endpoint
router.addRoute(RouteMatchers.requestUriMatcher(RoutingMode.EQUALS, "/docs/api"),
new Handler() {
@Override
public Promise<Response, NeverThrowsException> handle(Context context, Request request) {
final String uri = request.getUri().toString();
final String baseUrl = uri.substring(0, uri.indexOf("/docs/api"));
final String url = baseUrl + "/openapi/index.html?url="
+ Uris.urlEncodeQueryParameterNameOrValue(SWAGGER_JSON_ROUTE)
+ "&title=" + Uris.urlEncodeQueryParameterNameOrValue("Users and Devices API");

final Response response = new Response(Status.FOUND);
response.getHeaders().add("Location", url);
return Response.newResponsePromise(response);
}
});

// simple page providing links to HTML docs and Swagger UI
// simple page providing links to HTML docs
router.addRoute(new DelegatingRouteMatcher<Request>(RouteMatchers.requestUriMatcher(RoutingMode.EQUALS, "/")) {
@Override
public RouteMatch evaluate(Context context, Request request) {
Expand All @@ -151,7 +131,6 @@ public Promise<Response, NeverThrowsException> handle(Context context, Request r
final String html = "<!DOCTYPE html><html><head><title>CREST Examples</title></head><body>"
+ "<p><a href=\"?_api\">Users and Devices API OpenAPI JSON</a></p>"
+ "<p><a href=\"?_crestapi\">Users and Devices API CREST Descriptor JSON</a></p>"
+ "<p><a href=\"./docs/api\">Users and Devices API explorer</a></p>"
+ "<p><a href=\"./docs/html\">Users and Devices API documentation</a></p>"
+ "</body></html>";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
information: "Portions Copyright [year] [name of copyright owner]".

Copyright 2012-2015 ForgeRock AS.
Portions Copyrighted 2026 3A Systems, LLC.
-->
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
Expand All @@ -31,14 +32,4 @@
<url-pattern>/*</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>OpenAPIAssetsServlet</servlet-name>
<servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>OpenAPIAssetsServlet</servlet-name>
<url-pattern>/openapi/*</url-pattern>
</servlet-mapping>

</web-app>
98 changes: 0 additions & 98 deletions commons/rest/openapi-war-overlay/README.md

This file was deleted.

31 changes: 0 additions & 31 deletions commons/rest/openapi-war-overlay/pom.xml

This file was deleted.

36 changes: 0 additions & 36 deletions commons/rest/openapi-war-overlay/src/main/webapp/WEB-INF/web.xml

This file was deleted.

Loading
Loading