M2a: server workspace, kvitt-domain, skeleton routes, OpenAPI match, Dockerfile
Cargo workspace (kvitt-domain, kvitt-server, kvitt-import), Rust 1.99.1 pinned. kvitt-domain passes every Rust vector and adds next_occurrence_date (D-015). kvitt-server: config, SQLite pool (WAL, §8.9 pragmas), migration 0001 identical to the contract schema, error type for all 25 codes, auth extractor and protocol layer, all 33 routes (E-1/E-2 implemented, the rest 501), utoipa document equal to contracts/openapi.yaml, seams for M3/M4/M9, serve/migrate/healthcheck. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
//! E-33 settlement allocation proposal (SPEC §9.4).
|
||||
//!
|
||||
//! Registered and annotated by M2a; M3 owns this file and implements the handlers (until then 501
|
||||
//! `not_implemented`).
|
||||
|
||||
use crate::api::not_implemented;
|
||||
use crate::auth::AuthDevice;
|
||||
use crate::error::AppError;
|
||||
use crate::openapi::responses::{BadRequest, Conflict, Unprocessable};
|
||||
use crate::wire::{ProposalRequest, ProposalResponse};
|
||||
|
||||
#[utoipa::path(
|
||||
post,
|
||||
path = "/settlements/proposal",
|
||||
operation_id = "proposeSettlement",
|
||||
summary = "E-33 Server-side allocation proposal",
|
||||
description = "Computed with `kvitt-domain::propose_allocation` (SPEC §9.4) over the server's non-deleted rows.",
|
||||
request_body(content = ProposalRequest, content_type = "application/json; charset=utf-8"),
|
||||
responses(
|
||||
(status = 200, description = "The proposal.", body = ProposalResponse, content_type = "application/json; charset=utf-8"),
|
||||
(status = 400, response = BadRequest),
|
||||
(status = 409, response = Conflict),
|
||||
(status = 422, response = Unprocessable),
|
||||
)
|
||||
)]
|
||||
pub async fn propose_settlement(_device: AuthDevice) -> AppError {
|
||||
not_implemented()
|
||||
}
|
||||
Reference in New Issue
Block a user