Commit graph

4 commits

Author SHA1 Message Date
daniel
057dda8588 REST: include version in generated OpenAPI spec
The generated OpenAPI spec should contain information from the info
section of module spec files.

Bug: T366834
Change-Id: I488f550adbf32205bdcdcb59b1e7f5273643bf69
2024-08-19 20:47:40 +02:00
daniel
e6d0adcc68 REST: Generate request body specs from param settings.
Bug: T323786
Change-Id: I49da2a07efa32759480070c9d93c31d46f211d26
2024-07-10 20:23:56 +02:00
daniel
79c61e80dc REST: Make module definition files more like OpenAPI specs
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
2024-06-24 16:42:59 +02:00
daniel
91a1741787 Introduce Modules into the REST framework
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
2024-05-08 16:12:30 +02:00
Renamed from tests/phpunit/integration/includes/Rest/Handler/RootSpecHandlerTest.php (Browse further)