The following tasks need to be finished before we start work into building the lexeme endpoints themselves:
- Set up the REST API infrastructure for lexemes
- agree on a dir structure
- e2e test boilerplate
- architecture tests
- Write an ADR that points to ADR 25 (link here!) and the applicable CRUD ADRs
Task breakdown
We will not create an entirely new directory structure and instead follow what is outlined in src/DIRECTORIES.md. The following mapping should be documented in that file.
- use cases go into Interactors/ <- application
- domains models go into Domain/Model/ <- domain
- REST API serializers go into Presentation/RestSerialization/ <- application
- validators go into src/Validation/ (application layer) <- application
- data access implementation go into DataAccess/Store/ <- infrastructure
- route handlers go into MediaWiki/RestApi/ <- infrastructure
Architecture tests: should only cover "our" directories for now. This should follow the usual dependency rules and cover even directories/namespaces that don't yet exist.
e2e tests:
- api-testing script in package.json
- ensure api-testing runs for Lexeme (integration/config repo)
- add dummy test that calls the openapi.json route in the Wikibase REST API (will be deleted later)
ADR:
- mention decisions regarding directory structure
- generally follow ADR 25 + hexagonal
- decision made in CRUD domain ADRs generally apply