Page MenuHomePhabricator

🚧 Pre-work before building lexeme endpoints
Closed, ResolvedPublic5 Estimated Story Points

Description

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

Event Timeline

Jakob_WMDE set the point value for this task to 5.
Jakob_WMDE renamed this task from Pre-work before building lexeme endpoints to 🚧 Pre-work before building lexeme endpoints.Jun 24 2026, 12:50 PM
Jakob_WMDE updated the task description. (Show Details)

Look at patches I uploaded under T329096, are they usable here, at least to some extent?