contract

Export and compare the core HTTP contract without starting application services.

Clients use this module from the backend checkout they are targeting. Contract exports omit installed plugins and normalize only release metadata and Python’s standard HTTP 422 reason phrase. Runtime OpenAPI retains the installed version.

bedrock_server_manager.web.contract.normalize_contract(schema: dict[str, Any]) → dict[str, Any]

Return a stable copy while preserving all API structure and custom text.

bedrock_server_manager.web.contract.export_contract() → dict[str, Any]

Build registered core routers with no database, plugins, or lifespan.

bedrock_server_manager.web.contract.contract_changes(expected: dict[str, Any], actual: dict[str, Any]) → dict[str, list[str]]

Describe drift, including response models, shared parameters and metadata.

bedrock_server_manager.web.contract.main() → None

Write canonical JSON or fail if a bundled document differs from the backend.