Platform & Developer Tooling October 18, 2026 • 7 min read

Contract-First Ingestion & Living Documentation: Announcing OpenAPI 3.1 & Interactive Swagger UI in OpenCrawling

As enterprise data architectures embrace decoupled microservices, high-throughput lakehouses, and autonomous AI agents, API documentation cannot remain an afterthought buried in wikis or stale source code. Today, we are proud to announce the complete platform-wide adoption of the OpenAPI 3.1 Specification and an embedded, interactive Swagger UI Explorer across the entire OpenCrawling engine! From end-to-end type safety for our React 19 frontend to synchronized client SDKs and direct LLM tool calling via the Model Context Protocol (MCP), explore how contract-first architecture elevates developer velocity and enterprise interoperability. 📖⚡

Contract-First OpenAPI 3.1 Pipeline & Downstream Ecosystem
REST Controllers (Java 25 • Spring Boot 4)
→
springdoc-openapi (v3.1+)
→
Swagger UI Portal (:8080/swagger-ui.html)
→
OpenAPI 3.1 Spec (:8080/v3/api-docs)
→
TypeScript Types • Java SDK • AI Agent Tools

1. The Modern Enterprise Ingestion Dilemma: Beyond Documentation Drift

Building high-performance document ingestion engines on modern runtimes (Java 25 Virtual Threads, Structured Concurrency, Spring Boot 4) provides immense computing power. However, as OpenCrawling's footprint expanded across 10 functional domains—spanning job lifecycle orchestration, dynamic connector registration, OIS direct streaming, columnar Parquet lakehouse auditing, and AIOps root-cause telemetry—we recognized an architectural imperative:

2. Platform Architecture: Standardizing on OpenAPI 3.1

Rather than adopting legacy Swagger 2.0 or OpenAPI 3.0, OpenCrawling standardizes strictly on OpenAPI 3.1. This version represents a milestone alignment with JSON Schema 2020-12, supporting full schema polymorphism, standard type arrays, and modern web interoperability.

Under the hood, OpenCrawling leverages springdoc-openapi-starter-webmvc-ui (v3.1+), seamlessly integrated with Spring Boot 4. The architecture utilizes a code-first approach via standard Swagger annotations, preserving developer velocity in Java while generating contract-first specifications for downstream consumers:

// oc-runtime OpenApiConfig.java
@Configuration
public class OpenApiConfig {

    public static final String OIS_TOKEN_AUTH = "OisTokenAuth";

    @Bean
    public OpenAPI openCrawlingOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("OpenCrawling Runtime REST API")
                        .description("Enterprise-grade document crawling, RAG ingestion, and Lakehouse analytics pipeline.")
                        .version("1.0.0")
                        .license(new License().name("Apache License 2.0").url("https://www.apache.org/licenses/LICENSE-2.0")))
                .components(new Components()
                        .addSecuritySchemes(OIS_TOKEN_AUTH, new SecurityScheme()
                                .name(OIS_TOKEN_AUTH)
                                .type(SecurityScheme.Type.HTTP)
                                .scheme("bearer")
                                .bearerFormat("Token")
                                .description("Bearer token authentication for OIS document direct ingestion")));
    }
}

3. Interactive Swagger UI Explorer: Zero-Setup Sandbox

Every OpenCrawling runtime instance now serves the interactive Swagger UI out-of-the-box:

🚀

Instant Browser Access: Navigate directly to http://localhost:8080/swagger-ui.html. If running via Docker Compose with the Admin UI container on port 3000, access it transparently via Nginx reverse proxy at http://localhost:3000/swagger-ui.html.

The explorer allows developers to expand any endpoint, inspect required query filters (e.g. page, size, status), review comprehensive JSON request bodies, and execute live queries directly against running clusters.

4. Comprehensive 10-Domain API Coverage

Every single REST controller and DTO record in oc-runtime has been rigorously annotated with @Tag, @Operation, @ApiResponse, and @Schema annotations across 10 functional domains:

Domain Tag Primary Route Core Operations & Highlights
Pipeline & Jobs /api/jobs GET POST DELETE Job creation, lifecycle control (/start, /stop, /pause, /resume), real-time status monitoring, and document ledgers.
Connectors /api/connectors GET POST DELETE Registry management, discovery of supported repository/output types, and live connection health probing (/check).
OIS Direct Ingestion /api/v1/ingest/ois POST High-throughput HTTP gateway for external producers (e.g., StormCrawler bolts) publishing OIS UPSERT and DELETE tombstones. Secured with Bearer token authentication.
Reports & Lakehouse Audit /api/reports GET POST Job audit summaries, paginated document ledger queries, multi-format export (parquet, csv, avro, json), and embedded DuckDB SQL analytics (/query).
Observability & AIOps /api/observability GET Automated AI Root Cause Analysis (/diagnose/{jobId}), correlated OpenTelemetry trace timelines (/traces/{jobId}), error logs, and JVM virtual thread metrics.
System & Settings /api/system GET POST JVM health stats, memory consumption, real-time log streaming with level filters (/logs), and dynamic configuration tuning.
Transport Settings /api/system/settings/transport GET PUT POST Internal transport mode toggling (AUTO, GRPC, REST), gRPC port configuration, and live diagnostic ping probes (/ping).
ManifoldCF Migration /api/mcf-migration POST Automated translation of legacy Apache ManifoldCF crawler configurations into OpenCrawling with visual fidelity scoring (/plan, /apply).
Vespa Insights /api/vespa GET POST Cluster health checks, document counting, BM25 text queries, and bundled/custom schema package deployment.
Auto-Narrativization Copilot /api/transformation/copilot POST AI-powered generation of Mustache narrative templates and mock datasets from structured schema definitions using local Ollama or cloud OpenAI models.

5. Securing Endpoints with Bearer Token Authentication

The OpenAPI specification explicitly defines the OisTokenAuth HTTP Bearer security scheme. In the Swagger UI portal, developers can click the Authorize 🔓 button, input their ingestion token, and test token-protected endpoints like POST /api/v1/ingest/ois/{jobId} seamlessly without having to configure HTTP header flags manually.

// Sample OisIngestController Swagger documentation
@Operation(
    summary = "Direct Ingestion of OIS Document",
    description = "Publishes an Open Ingestion Standard (OIS) document payload directly into the active job pipeline.",
    security = @SecurityRequirement(name = OpenApiConfig.OIS_TOKEN_AUTH)
)
@ApiResponses(value = {
    @ApiResponse(responseCode = "202", description = "Document accepted and published to Kafka"),
    @ApiResponse(responseCode = "400", description = "Malformed JSON or invalid OIS document structure"),
    @ApiResponse(responseCode = "401", description = "Missing or invalid bearer token"),
    @ApiResponse(responseCode = "404", description = "Endpoint disabled or target job ID not found"),
    @ApiResponse(responseCode = "409", description = "Job runs in migration mode (OIS supports RAG mode only)"),
    @ApiResponse(responseCode = "503", description = "Kafka ingestion event bus unavailable")
})
@PostMapping("/{jobId}")
public ResponseEntity<String> ingest(...) { ... }

6. End-to-End Type Safety for React 19 & Client SDKs

With machine-readable OpenAPI schemas exported at /v3/api-docs, downstream clients benefit from automated contract generation:

7. Empowering Autonomous AI Agents & MCP Tool Calling

One of the most exciting advantages of standardizing on OpenAPI 3.1 is its native compatibility with LLM Function Calling and the Model Context Protocol (MCP):

8. Configuration & Nginx Docker Reverse Proxy

OpenAPI docs and Swagger UI paths are fully configurable via Spring Boot properties in application.yml:

springdoc:
  api-docs:
    path: ${SPRINGDOC_API_DOCS_PATH:/v3/api-docs}
    enabled: ${SPRINGDOC_API_DOCS_ENABLED:true}
    version: OPENAPI_3_1
  swagger-ui:
    path: ${SPRINGDOC_SWAGGER_UI_PATH:/swagger-ui.html}
    enabled: ${SPRINGDOC_SWAGGER_UI_ENABLED:true}
    display-request-duration: true
    operations-sorter: method
    tags-sorter: alpha
    doc-expansion: none
  show-actuator: false

In containerized deployments, oc-admin-ui's Nginx reverse proxy routes all /v3 and /swagger-ui traffic transparently to the backend container, while Spring WebMVC's single-page application router (WebConfig.java) preserves these documentation paths from client-side fallback forwards.

9. Automated CI/CD Contract Testing

To ensure API governance remains airtight across community contributions, OpenCrawling enforces documentation assertions via reflection tests in OpenApiDocumentationTest.java:

✅

Automated Validation Suite: Verifies that every @RestController implements @Tag, every public mapping method defines @Operation summaries and explicit @ApiResponse codes, core DTO records have @Schema descriptions, and Swagger ModelConverters cleanly resolves all Java 25 record models.

Explore the Interactive Swagger UI Today

Start OpenCrawling locally or in Docker, explore the interactive Swagger UI portal, read our comprehensive Wiki guide, or join the discussion on GitHub!