aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/unit/includes/Rest/Module/moduleFlatRoutes.json
Commit message (Collapse)AuthorAgeFilesLines
* REST: Make module definition files more like OpenAPI specsdaniel2024-06-241-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | This splits RouteFileModule into two classes, ExtraRoutesModule and SpecBasedModule. ExtraRoutesModule has no module prefix and supports only "flat" route definition files and additional routes from extension.json. SpecBasedModule represents a single module defined in a definition file similar to an OpenAPI spec. The idea is that a full OpenAPI spec can be generated by filling in any missing information based on information provided by the Handler implementation. In particular, the definition of parameters and request body schemas will be generated. A JSON schema for the new file format is added under docs/rest/. Support for the intermediate format introduced in Iebcde4645d4 is removed. It was not included in a release and was not being used outside core tests. Bug: T366837 Change-Id: I4ce306b0997f80b78a3d901e38bbfa8445bed604
* REST: fix metrics keysdaniel2024-05-211-1/+1
| | | | | | | | | | | | | | In Iebcde4645d472d2 I broke the way we generate metrics keys from endpoint paths. Instead of using the declared paths with placeholders, we were recording the actual paths, resulting in an explosion of metrics keys. This moves metrics logging from Router into Module, where the declared path is available. This patch also introduces regression tests for the issue. Bug: T365111 Change-Id: I2c9ddfe6e28aaecd313356894f17033e2db59073
* Introduce Modules into the REST frameworkdaniel2024-05-081-0/+6
Modules group together endpoints by a shared prefix. The idea is that each module has its own version and can generated self-contained self-documentation. This allows clients to have clear expectations about the endpoints of each module, no matter what wiki they are accessing. So far, each wiki may be exposing a different set of endpoints, with no way to provide a spec that describes that set of endpoints in a way that would be consistent across wikis and stable over time. Bug: T362480 Change-Id: Iebcde4645d472d27eee5a30adb6eee12cc7d046b