Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Visibility

Jon Ursenbach edited this page Jan 4, 2020 · 7 revisions

Note: Visibility status is not currently being used when compiling specifications, however support is on the Mill roadmap.

We have the concept of an annotation visibility "decorator" that allows you to set certain annotations as private, or explicitly public. With this additional metadata, you can do cool things like only show certain endpoints or parameters to privileged developers in your documentation.

Usage

To choose what visibility your annotation should have, suffix your annotation with either :public or :private.

/**
 * @api-label Update a movie
 * @api-operationid updateMovie
 * @api-group Movies
 *
 * @api-path:public /movies/+id
 * @api-path:private /films/+id
 * @api-pathparam id (integer) - Movie ID
 *
 * @api-error:private 403 (\Some\ErrorErrorRepresentation) - If the user isn't
 *    allowed to do something.
 */
public function PATCH()
{
    ...
}

Visibility decorators are required on @api-param, @api-queryparam, @api-return, @api-error, and @api-path.

Clone this wiki locally