This project uses standard JAX-RS and MicroProfile OpenAPI annotations to generate comprehensive API documentation for the Cassandra Sidecar.
# Generate OpenAPI specifications (JSON and YAML) ./gradlew generateOpenApiSpec # Generated files: # - server/build/generated/openapi/openapi.json # - server/build/generated/openapi/openapi.yaml
The generated OpenAPI specifications are automatically copied to the application resources during build:
./gradlew build # OpenAPI specs are packaged in: server/build/resources/main/openapi/
The running Sidecar server provides multiple OpenAPI endpoints:
GET http://localhost:9043/spec/openapi.jsonGET http://localhost:9043/spec/openapi.yamlGET http://localhost:9043/openapi.htmlThe Cassandra Sidecar uses industry-standard annotations for OpenAPI documentation generation:
@GET, @POST, @PUT, @DELETE, @Path - Define HTTP methods and routes@Operation, @APIResponse, @Schema - Add comprehensive API documentationHealthResponse, SchemaResponse, TableStatsResponse, etc.When creating new API endpoints, add the appropriate annotations:
@GET @Path("/api/v1/new-endpoint") @Operation(summary = "Brief description", description = "Detailed description of what this endpoint does") @APIResponse(description = "Success response description", responseCode = "200", content = @Content(mediaType = "application/json", schema = @Schema(implementation = MyResponseClass.class))) public VertxRoute myEndpoint(RouteBuilder.Factory factory, MyHandler handler) { return factory.builderForRoute() .handler(handler) .build(); }