aboutsummaryrefslogtreecommitdiffstats
path: root/includes/Rest/Module/SpecBasedModule.php
Commit message (Collapse)AuthorAgeFilesLines
* REST: Make OpenAPI spec info strings translatablebpirkle2025-03-211-0/+4
| | | | | | | | | OpenAPI specs include an "info" section that includes strings such as "title" and "description" that are intended to be human-readable. Make all such strings translatable. Bug: T385855 Change-Id: I15285be6d196c0e7fd7e922f23058d7c09b6b31a
* Merge "Add RestCheckCanExecute hook"jenkins-bot2025-01-201-2/+5
|\
| * Add RestCheckCanExecute hookGergő Tisza2025-01-201-2/+5
| | | | | | | | | | | | | | | | Add a REST API hook that allows disabling specific endpoints or rejecting specific requests, similar to ApiCheckCanExecuteHook. Bug: T383011 Change-Id: I8518cb1ad7f00594c9f31d7bf934b1ce74f18da9
* | Remove 2-line PHPDocs that just repeat the types from the codethiemowmde2025-01-171-4/+0
|/ | | | | | | | | | | | | | | | Same as Ia294bf4 did for 1-line comments. This patch removes slightly more complex 2-line PHPDoc comments that don't add any new information to the code, but literally repeat what the code already says. They say "don't document the code, code the documentation", and we are doing this more and more. We just tend to forget to remove the obsolete comments. Note I'm also removing a line of text in a few cases when it's very short and literally says the same as the method name. Again, such comments add zero new information. Change-Id: I01535404bab458c6c47e48e5456403b7a64198ed
* REST: Introduce discovery endpointdaniel2024-09-201-0/+1
| | | | | | | | The discovery endpoint provides basic information about accessing the wiki's APIs, as well as a directory of available modules. Bug: T365753 Change-Id: I161aa68566da91867b650e13c8aadc87cd0c428c
* REST: include version in generated OpenAPI specdaniel2024-08-191-3/+8
| | | | | | | | The generated OpenAPI spec should contain information from the info section of module spec files. Bug: T366834 Change-Id: I488f550adbf32205bdcdcb59b1e7f5273643bf69
* REST: Make module definition files more like OpenAPI specsdaniel2024-06-241-0/+216
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