temp commit
This commit is contained in:
parent
8760f27b51
commit
0e9e49df16
193 changed files with 23228 additions and 935 deletions
12
docs/developer/api-contract.md
Normal file
12
docs/developer/api-contract.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# API Contracts
|
||||
|
||||
`Scholarr` is designed with strictly typed Pydantic V2 models, serialized across the network through standard OpenAPI `v3` specs via FastAPI.
|
||||
|
||||
## DTO Models Structure
|
||||
FastAPI routes dynamically ingest request/response Data Transfer Objects.
|
||||
- **Example**: `PublicationListItem` no longer contains a hard-coded `.doi`. It contains a `.display_identifier` property resolving the highest confidence identifier regardless of backend origin.
|
||||
- **Testing**: Run `./scripts/check_frontend_api_contract.py` or equivalent integration steps mapped in CI to ensure that backend python routes strictly map to the TypeScript types compiled by the Frontend.
|
||||
|
||||
## Frontend Contract Requirements
|
||||
The UI exclusively calls routes exposed by FastAPI's `APIRouter`.
|
||||
All frontend integration tests enforce that Vue 3 Components do not assume hard properties directly outside the bounded TS schemas. This avoids type mismatch runtime explosions if the database is scaled horizontally.
|
||||
Loading…
Add table
Add a link
Reference in a new issue