Skip to content

Commit d7f1374

Browse files
committed
feat(server): type REST OpenAPI contracts
Replace the generic OpenAPI request and response schemas with route-specific components for the WorldForge REST server. This makes /v1/openapi.json useful for client generation and contract validation while preserving runtime route behavior. Milestone: Typed OpenAPI contract for REST server Changes: - crates/worldforge-server/src/lib.rs: add reusable OpenAPI schema helpers and typed route components - crates/worldforge-server/src/lib.rs: emit typed request-body refs and route-specific success envelopes - crates/worldforge-server/tests/integration.rs: verify live OpenAPI request and response refs for representative POST routes - README.md: document that /v1/openapi.json now carries typed route schemas Validated: cargo fmt -- --check; cargo test -p worldforge-server --quiet; cargo test --workspace --quiet; cargo clippy -p worldforge-server --all-targets -- -D warnings; cargo clippy --workspace --all-targets -- -D warnings
1 parent 35058b8 commit d7f1374

3 files changed

Lines changed: 2645 additions & 144 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,8 +829,10 @@ Python bindings now reuse the shared Rust core facade for provider discovery,
829829
health checks, prediction comparison, and state persistence instead of
830830
duplicating orchestration logic. The REST server now also publishes a
831831
machine-readable `/v1/openapi.json` contract generated from the same route
832-
catalog that powers the `/v1` index, so the live API surface stays discoverable
833-
without maintaining a second hand-written route list.
832+
catalog that powers the `/v1` index, with typed route-specific request and
833+
response schemas for client generation and validation instead of a generic
834+
envelope-only document. The live API surface stays discoverable without
835+
maintaining a second hand-written route list.
834836
The mock provider now serves as a higher-fidelity offline reference backend:
835837
object motion keeps bounding boxes and inferred relationships in sync,
836838
predictions can emit lightweight preview video/depth/segmentation outputs, and

0 commit comments

Comments
 (0)