OpenApiMergeService
in package
Merges the base OpenAPI spec with plugin-provided fragments.
Each plugin may place an openapi.yaml in its config/ directory.
The service deep-merges paths, tags, and component schemas into a
single spec that is served to Swagger UI.
Table of Contents
Methods
- getMergedSpec() : array<string|int, mixed>
- Build the merged OpenAPI spec array.
- merge() : array<string|int, mixed>
- Deep-merge a plugin fragment into the base spec.
Methods
getMergedSpec()
Build the merged OpenAPI spec array.
public
getMergedSpec() : array<string|int, mixed>
Return values
array<string|int, mixed> —The complete OpenAPI spec.
merge()
Deep-merge a plugin fragment into the base spec.
private
merge(array<string|int, mixed> $base, array<string|int, mixed> $fragment) : array<string|int, mixed>
Parameters
- $base : array<string|int, mixed>
-
The accumulating spec.
- $fragment : array<string|int, mixed>
-
The plugin fragment.