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

@api‐scope

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

This corresponds to an available user authentication token scope (ex. "create", "edit", "interact`, etc.) that is required for a resource action, or a representation data point.

Syntax

@api-scope scope description

Requirements

Required? Needs a visibility Supports versioning Supports deprecation
× × × ×

Breakdown

Tag Optional Description
scope × Authentication scope required for the resource action.
description Description for what the required scope is, or is used for.

Examples

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