gollumsf/rest-doc-bundle
gollumsf/rest-doc-bundle is a Symfony bundle that generates browsable REST API documentation from your controllers and annotations, helping teams discover endpoints and keep request/response references close to the code. It streamlines maintaining up-to-date API docs alongside your application.
gollumsf/rest-bundle:^4.1 is installed — older versions may not expose the metadata the doc generator needs).#[ApiSortable] attribute. Declare it on the entity properties/fields you want clients to be able to sort by, e.g. title and author on a Product entity.order parameter. If sortable keys are declared, the docs will list them:
order string
Comma separated sort keys, each optionally suffixed by ":asc" or ":desc".
Allowed keys: title, author.
example: title:desc
order parameter now advertises concrete sort keys instead of a free-form string. Then exercise GET /resource?order=title:desc to verify runtime behaviour matches the docs.#[ApiSortable] on the entity for keys that are always sortable, and add it to controller actions to restrict or extend the allowlist per endpoint. This keeps the generated docs aligned with what each endpoint actually supports.order=title:desc,author:asc everywhere — examples, tests, and client SDKs. The generated example (title:desc) is a good template.direction callers. Replace any direction=desc usage in clients, test fixtures, and API examples with order=field:desc. The runtime still accepts direction, but it is deprecated and no longer surfaced in docs.CollectionHandler, update the constructor to accept MetadataSortManagerInterface. Normal usage needs no change because the service is autowired.#[ApiSortable] declared, order is documented as a free string. This is easy to miss and gives clients no guidance; audit endpoints to ensure sortable keys are actually declared.direction is doc-invisible but still live. Clients relying on generated documentation will no longer discover direction. Treat it as deprecated in your own docs and plan removal before the next major.CollectionHandler::__construct() now takes MetadataSortManagerInterface. Subclasses, decorators, and manual service definitions must be updated; autowired setups are unaffected.order still shows as a free string, verify the attribute is on the entity/action the doc generator inspects, then clear caches.gollumsf/rest-bundle:^4.1 is resolved; an older lockfile can leave docs without the new metadata.title:desc; make sure your declared sort keys map to real fields/columns, otherwise clients will follow docs into runtime errors.How can I help you explore Laravel packages today?