-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
separate tests anotations to files for swagger-php:4 support
- Loading branch information
1 parent
740e332
commit b1f6b79
Showing
6 changed files
with
161 additions
and
120 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
namespace Tests\storage\annotations\OpenApi; | ||
|
||
/** | ||
* @OA\Info( | ||
* version="1.0.0", | ||
* title="SwaggerLume OpenApi", | ||
* description="SwaggerLume OpenApi description", | ||
* @OA\Contact( | ||
* email="darius@matulionis.lt" | ||
* ), | ||
* @OA\License( | ||
* name="Apache 2.0", | ||
* url="http://www.apache.org/licenses/LICENSE-2.0.html" | ||
* ), | ||
* @OA\PathItem( | ||
* path="/" | ||
* ) | ||
* ) | ||
*/ | ||
class Info | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
|
||
namespace Tests\storage\annotations\OpenApi; | ||
|
||
class Projects | ||
{ | ||
/** | ||
* @OA\Get( | ||
* path="/projects", | ||
* operationId="getProjectsList", | ||
* tags={"Projects"}, | ||
* summary="Get list of projects", | ||
* description="Returns list of projects", | ||
* @OA\Response( | ||
* response=200, | ||
* description="successful operation" | ||
* ), | ||
* @OA\Response(response=400, description="Bad request"), | ||
* security={ | ||
* {"api_key_security_example": {}} | ||
* } | ||
* ) | ||
* | ||
* Returns list of projects | ||
*/ | ||
public function getProjectsList(): void | ||
{ | ||
|
||
} | ||
|
||
/** | ||
* @OA\Get( | ||
* path="/projects/{id}", | ||
* operationId="getProjectById", | ||
* tags={"Projects"}, | ||
* summary="Get project information", | ||
* description="Returns project data", | ||
* @OA\Parameter( | ||
* name="id", | ||
* description="Project id", | ||
* required=true, | ||
* in="path", | ||
* @OA\Schema( | ||
* type="integer" | ||
* ) | ||
* ), | ||
* @OA\Response( | ||
* response=200, | ||
* description="successful operation" | ||
* ), | ||
* @OA\Response(response=400, description="Bad request"), | ||
* @OA\Response(response=404, description="Resource Not Found"), | ||
* security={ | ||
* { | ||
* "oauth2_security_example": {"write:projects", "read:projects"} | ||
* } | ||
* }, | ||
* ) | ||
*/ | ||
public function getProjectById(): void | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
namespace Tests\storage\annotations\OpenApi; | ||
|
||
/** | ||
* @OA\SecurityScheme( | ||
* type="oauth2", | ||
* description="Use a global client_id / client_secret and your username / password combo to obtain a token", | ||
* name="Password Based", | ||
* in="header", | ||
* scheme="https", | ||
* securityScheme="Password Based", | ||
* @OA\Flow( | ||
* flow="password", | ||
* authorizationUrl="/oauth/authorize", | ||
* tokenUrl="/oauth/token", | ||
* refreshUrl="/oauth/token/refresh", | ||
* scopes={} | ||
* ) | ||
* ) | ||
*/ | ||
class SecurityScheme | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Tests\storage\annotations\OpenApi; | ||
|
||
|
||
/** | ||
* @OA\Server( | ||
* url=SWAGGER_LUME_CONST_HOST, | ||
* description="SwaggerLume OpenApi dynamic host server" | ||
* ) | ||
* | ||
* @OA\Server( | ||
* url="https://projects.dev/api/v1", | ||
* description="SwaggerLume OpenApi Server" | ||
* ) | ||
*/ | ||
class Server | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Tests\storage\annotations\OpenApi; | ||
|
||
/** | ||
* @OA\Tag( | ||
* name="project", | ||
* description="Everything about your Projects", | ||
* @OA\ExternalDocumentation( | ||
* description="Find out more", | ||
* url="http://swagger.io" | ||
* ) | ||
* ) | ||
* | ||
* @OA\Tag( | ||
* name="user", | ||
* description="Operations about user", | ||
* @OA\ExternalDocumentation( | ||
* description="Find out more about", | ||
* url="http://swagger.io" | ||
* ) | ||
* ) | ||
* @OA\ExternalDocumentation( | ||
* description="Find out more about Swagger", | ||
* url="http://swagger.io" | ||
* ) | ||
*/ | ||
class Tag | ||
{ | ||
} |