Gilfeather/furnace

📚 Add comprehensive API documentation

オヌプン

#9 opened on 2025/07/16

 (0 件のコメント) (0 件のリアクション) (0 人の担圓者)Rust (5 件のフォヌク)auto 404
documentationgood first issuehelp wanted

Repository metrics

Stars
 (64 個のスタヌ)
PR merge metrics
 (PR metrics pending)

説明

Description

Create detailed API documentation with examples and OpenAPI/Swagger specification.

Acceptance Criteria

  • Add OpenAPI 3.0 specification file (openapi.yaml)
  • Document all endpoints with request/response schemas
  • Include example requests and responses
  • Add error code documentation
  • Generate HTML documentation from spec
  • Add link to docs in README

Current API Endpoints to Document

  1. GET /healthz - Health check
  2. GET /model/info - Model information and statistics
  3. POST /predict - Inference endpoint

Updated API Specifications

Since the API now uses built-in models (ResNet18), documentation should reflect:

Model Info Response:

  • Built-in model: resnet18
  • Input shape: [1, 3, 224, 224] (150,528 elements)
  • Output shape: [1000] (ImageNet classes)
  • Backend: burn-resnet18

Predict Request:

  • Single:
  • Batch:

Error Codes:

  • 400: INPUT_VALIDATION_FAILED
  • 500: INFERENCE_FAILED
  • 503: MODEL_NOT_LOADED

Implementation Guidance

  • Use utoipa crate for Rust-native OpenAPI generation
  • Add documentation attributes to API handlers in src/api.rs
  • Include realistic ResNet18 example data (150,528 input values)
  • Consider using Swagger UI for interactive docs
  • Update examples to use built-in models instead of file paths

Estimated Difficulty

Medium - 1-2 days (updated for current API structure)

コントリビュヌタヌガむド