| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- <?php
- namespace OpenApi\LinkExample;
- class RepositoriesController
- {
- /**
- * @OA\Get(path="/2.0/repositories/{username}",
- * operationId="getRepositoriesByOwner",
- * @OA\Parameter(
- * name="username",
- * in="path",
- * required=true,
- * @OA\Schema(type="string")
- * ),
- * @OA\Response(response=200,
- * description="repositories owned by the supplied user",
- * @OA\JsonContent(type="array",
- * @OA\Items(ref="#/components/schemas/repository")
- * ),
- * @OA\Link(link="userRepository", ref="#/components/links/UserRepository")
- * )
- * )
- * @OA\Link(link="UserRepositories",
- * operationId="getRepositoriesByOwner",
- * parameters={"username"="$response.body#/username"}
- * )
- */
- public function getRepositoriesByOwner($username)
- {
- }
- /**
- ** @OA\Get(path="/2.0/repositories/{username}/{slug}",
- * operationId="getRepository",
- * @OA\Parameter(name="username",
- * in="path",
- * required=true,
- * @OA\Schema(type="string")
- * ),
- * @OA\Parameter(name="slug",
- * in="path",
- * required=true,
- * @OA\Schema(type="string")
- * ),
- * @OA\Response(response=200,
- * description="The repository",
- * @OA\JsonContent(ref="#/components/schemas/repository"),
- * @OA\Link(link="repositoryPullRequests", ref="#/components/links/RepositoryPullRequests")
- * )
- * )
- * )
- * @OA\Link(link="UserRepository",
- * operationId="getRepository",
- * parameters={
- * "username"="$response.body#/owner/username",
- * "slug"="$response.body#/slug"
- * }
- * )
- */
- public function getRepository()
- {
- }
- /**
- * @OA\Get(path="/2.0/repositories/{username}/{slug}/pullrequests",
- * operationId="getPullRequestsByRepository",
- * @OA\Parameter(name="username",
- * in="path",
- * required=true,
- * @OA\Schema(type="string")
- * ),
- * @OA\Parameter(name="slug",
- * in="path",
- * required=true,
- * @OA\Schema(type="string")
- * ),
- * @OA\Parameter(name="state",
- * in="query",
- * @OA\Schema(type="string",
- * enum={"open", "merged", "declined"}
- * )
- * ),
- * @OA\Response(response=200,
- * description="an array of pull request objects",
- * @OA\JsonContent(type="array",
- * @OA\Items(ref="#/components/schemas/pullrequest")
- * )
- * )
- * )
- * @OA\Link(link="RepositoryPullRequests",
- * operationId="getPullRequestsByRepository",
- * parameters={
- * "username"="$response.body#/owner/username",
- * "slug"="$response.body#/slug"
- * }
- * )
- */
- public function getPullRequestsByRepository()
- {
- }
- /**
- * @OA\Get(path="/2.0/repositories/{username}/{slug}/pullrequests/{pid}",
- * operationId="getPullRequestsById",
- * @OA\Parameter(name="username",
- * in="path",
- * required=true,
- * @OA\Schema(type="string")
- * ),
- * @OA\Parameter(name="slug",
- * in="path",
- * required=true,
- * @OA\Schema(type="string")
- * ),
- * @OA\Parameter(name="pid",
- * in="path",
- * required=true,
- * @OA\Schema(type="string")
- * ),
- * @OA\Response(response=200,
- * description="a pull request object",
- * @OA\JsonContent(ref="#/components/schemas/pullrequest"),
- * @OA\Link(link="pullRequestMerge", ref="#/components/links/PullRequestMerge")
- * )
- * )
- */
- public function getPullRequestsById()
- {
- }
- /**
- * @OA\Post(path="/2.0/repositories/{username}/{slug}/pullrequests/{pid}/merge",
- * operationId="mergePullRequest",
- * @OA\Parameter(name="username",
- * in="path",
- * required=true,
- * @OA\Schema(type="string")
- * ),
- * @OA\Parameter(name="slug",
- * in="path",
- * required=true,
- * @OA\Schema(type="string")
- * ),
- * @OA\Parameter(name="pid",
- * in="path",
- * required=true,
- * @OA\Schema(type="string")
- * ),
- * @OA\Response(response=204,
- * description="the PR was successfully merged"
- * )
- * )
- * @OA\Link(link="PullRequestMerge",
- * operationId="mergePullRequest",
- * parameters={
- * "username"="$response.body#/author/username",
- * "slug"="$response.body#/repository/slug",
- * "pid"="$response.body#/id"
- * }
- * )
- */
- public function mergePullRequest()
- {
- }
- }
- ?>
|