Skip to content

#2579 feat: add OpenAPI specification endpoint and related handlers#2583

Merged
robfrank merged 4 commits intomainfrom
fix/2579-openapi-endpoints
Oct 1, 2025
Merged

#2579 feat: add OpenAPI specification endpoint and related handlers#2583
robfrank merged 4 commits intomainfrom
fix/2579-openapi-endpoints

Conversation

@robfrank
Copy link
Collaborator

This pull request adds initial support for serving an OpenAPI 3.0+ specification for the ArcadeDB HTTP API. It introduces a new endpoint at /api/v1/openapi.json that provides a machine-readable API spec, adds necessary dependencies, and includes integration tests to validate the endpoint and its output. The changes lay the groundwork for future improvements in API documentation and client generation.

OpenAPI Endpoint Implementation:

  • Added GetOpenApiHandler to serve the OpenAPI specification at /api/v1/openapi.json, including caching for performance and requiring authentication for access. (server/src/main/java/com/arcadedb/server/http/handler/GetOpenApiHandler.java)
  • Registered the new endpoint in the HTTP server routes. (server/src/main/java/com/arcadedb/server/http/HttpServer.java)

Dependency Management:

  • Added Swagger and OpenAPI dependencies to pom.xml to support spec generation and validation. (server/pom.xml)

Testing and Validation:

  • Added a comprehensive integration test (OpenApiSpecGenerationIT) that verifies the endpoint is accessible, returns valid OpenAPI 3.0+ JSON, documents all expected endpoints, includes request/response models, and provides security information. (server/src/test/java/com/arcadedb/server/http/OpenApiSpecGenerationIT.java)

Backward Compatibility:

  • Introduced OpenApiHandler as an alias for GetOpenApiHandler to match test expectations and maintain naming consistency. (server/src/main/java/com/arcadedb/server/http/handler/OpenApiHandler.java)

Internal Imports:

  • Updated imports in HttpServer.java to include the new handler. (server/src/main/java/com/arcadedb/server/http/HttpServer.java)

@robfrank robfrank requested a review from Copilot September 29, 2025 11:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements OpenAPI specification generation for the ArcadeDB HTTP API by adding a new endpoint at /api/v1/openapi.json that serves a comprehensive OpenAPI 3.0+ specification. The implementation includes proper authentication, caching for performance, and extensive integration tests.

  • Adds OpenAPI endpoint implementation with caching and authentication requirements
  • Includes comprehensive integration tests that validate the endpoint functionality and spec format
  • Adds necessary Swagger/OpenAPI dependencies for spec generation and validation

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
OpenApiSpecGenerationIT.java Comprehensive integration test suite validating OpenAPI endpoint accessibility, spec format, endpoint coverage, and security
OpenApiSpecGenerator.java Core generator class that creates the complete OpenAPI specification with all endpoints, schemas, and security definitions
OpenApiHandler.java Alias class extending GetOpenApiHandler for backward compatibility with test expectations
GetOpenApiHandler.java HTTP handler serving the OpenAPI spec at /api/v1/openapi.json with caching and authentication
HttpServer.java Registers the new OpenAPI endpoint in the server routes
pom.xml Adds required Swagger and OpenAPI dependencies for spec generation and testing

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@robfrank robfrank force-pushed the fix/2579-openapi-endpoints branch from d1c3c17 to 22bf435 Compare September 29, 2025 12:01
@robfrank robfrank linked an issue Sep 29, 2025 that may be closed by this pull request
2 tasks
@robfrank robfrank added this to the 25.9.1 milestone Sep 29, 2025
@robfrank robfrank self-assigned this Sep 29, 2025
@robfrank robfrank added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 29, 2025
@codacy-production
Copy link

codacy-production bot commented Sep 29, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.16% 96.17%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (959b2af) 72484 45719 63.07%
Head commit (b45ceaa) 72876 (+392) 46084 (+365) 63.24% (+0.16%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#2583) 392 377 96.17%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@robfrank robfrank requested a review from lvca September 29, 2025 12:53
@lvca
Copy link
Contributor

lvca commented Sep 29, 2025

Impressive!

@robfrank robfrank marked this pull request as ready for review September 30, 2025 09:29
@robfrank robfrank force-pushed the fix/2579-openapi-endpoints branch 2 times, most recently from c10a8b5 to 76d328c Compare September 30, 2025 14:39
@robfrank robfrank force-pushed the fix/2579-openapi-endpoints branch from 76d328c to b45ceaa Compare September 30, 2025 18:22
@robfrank robfrank merged commit 0b6b676 into main Oct 1, 2025
17 of 24 checks passed
robfrank added a commit that referenced this pull request Nov 10, 2025
@robfrank robfrank deleted the fix/2579-openapi-endpoints branch January 14, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add openApi to http endpoins

3 participants