Wikibase
MediaWiki Wikibase extension
|
This REST API follows the Hexagonal Architecture approach and takes inspiration from an article about Netflix's use of the hexagonal architecture. This decision is documented in ADR 0001.
The code is divided into three layers: Domain, Application, and Infrastructure. Domain and Application define the core business and application logic of the software, whereas the infrastructure layer deals with any external dependencies and concepts, such as transport or persistence details.
docs/
../../docs/rest-api/
: the built OpenAPI specification and swagger documentationspecs/
: OpenAPI specification sourcesrc/
Domain/
Model/
: Entities and value objects used when persisting dataReadModel/
: Entities and value objects used when retrieving dataServices/
: Secondary ports, i.e. persistence interfaces such as retrievers and updatersApplication/
Serialization/
: Deserializers used for turning user input into write models, serializers used for turning read models into JSON-serializable objectsValidation/
: Generic (not use cases specific) classes for validating user inputUseCases/
: Primary ports of the application coreInfrastructure/
: Secondary adapters, i.e. implementations of interfaces defined in the application coreDataAccess/
: Implementations of persistence servicesRouteHandlers/
: Web controllers acting as primary adapterstests/
mocha/
: tests using the mocha frameworkapi-testing/
: end-to-end tests using MediaWiki's api-testing libraryopenapi-validation/
: tests against the OpenAPI specphpunit/
: integration and unit tests using the phpunit framework