-
Notifications
You must be signed in to change notification settings - Fork 22
Issue/522 demoapi openapi coverage #523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
armanist
merged 8 commits into
softberg:master
from
armanist:issue/522-demoapi-openapi-coverage
May 14, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
de2c103
[#522] Align DemoApi OpenAPI templates and add missing endpoint coverage
armanist 94f519e
[#522] Add deterministic success response examples for DemoApi endpoints
armanist bf5bd3d
[#522] Add 429 responses and refine deterministic success examples
armanist b1e8503
[#522] Document 401 response for resend endpoint
armanist 434d9d5
[#522] Document signin/verify success tokens in DemoApi OpenAPI auth …
armanist b968a7f
[#522] Fix generated OpenAPI spec route path concatenation
armanist 956254b
[#522] Update OpenApiCommand path assertion to DS-based generated route
armanist 4e753bd
[#522] Align DemoApi OpenAPI auth/account/post contracts and spec pat…
armanist File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
97 changes: 97 additions & 0 deletions
97
src/Module/Templates/DemoApi/src/Controllers/OpenApi/OpenApiAccountController.php.tpl
This file contains hidden or 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,97 @@ | ||
| <?php | ||
|
|
||
| /** | ||
| * Quantum PHP Framework | ||
| * | ||
| * An open source software development framework for PHP | ||
| * | ||
| * @package Quantum | ||
| * @author Arman Ag. <arman.ag@softberg.org> | ||
| * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org) | ||
| * @link http://quantum.softberg.org/ | ||
| * @since 3.0.0 | ||
| */ | ||
|
|
||
| namespace {{MODULE_NAMESPACE}}\Controllers\OpenApi; | ||
|
|
||
| use Quantum\Http\Request; | ||
|
|
||
| /** | ||
| * Class OpenApiAccountController | ||
| * @package Modules\Api | ||
| */ | ||
| abstract class OpenApiAccountController extends OpenApiController | ||
| { | ||
| /** | ||
| * Update user info action | ||
| * @OA\Put( | ||
| * path="/api/account-settings/update", | ||
| * tags={"Account"}, | ||
| * summary="Update user info", | ||
| * operationId="updateAccount", | ||
| * security={{"bearer_token": {}}}, | ||
| * @OA\RequestBody( | ||
| * required=true, | ||
| * @OA\MediaType( | ||
| * mediaType="application/json", | ||
| * @OA\Schema( | ||
| * required={"firstname", "lastname"}, | ||
| * @OA\Property(property="firstname", type="string"), | ||
| * @OA\Property(property="lastname", type="string"), | ||
| * example={"firstname": "Jon", "lastname": "Smit"} | ||
| * ) | ||
| * ) | ||
| * ), | ||
| * @OA\Response( | ||
| * response=200, | ||
| * description="Success", | ||
| * @OA\JsonContent( | ||
| * example={"status": "success", "message": "Updated successfully"} | ||
| * ) | ||
| * ), | ||
| * @OA\Response(response=401, description="Unauthorized Request"), | ||
| * @OA\Response(response=422, description="Unprocessable Entity"), | ||
| * @OA\Response(response=429, description="Too Many Requests"), | ||
| * @OA\Response(response=500, description="Internal Server Error") | ||
| * ) | ||
| */ | ||
| abstract public function update(Request $request); | ||
|
|
||
| /** | ||
| * Update password action | ||
| * @OA\Put( | ||
| * path="/api/account-settings/update-password", | ||
| * tags={"Account"}, | ||
| * summary="Update password", | ||
| * operationId="updatePassword", | ||
| * security={{"bearer_token": {}}}, | ||
| * @OA\RequestBody( | ||
| * required=true, | ||
| * @OA\MediaType( | ||
| * mediaType="application/json", | ||
| * @OA\Schema( | ||
| * required={"current_password", "new_password", "confirm_password"}, | ||
| * @OA\Property(property="current_password", type="string"), | ||
| * @OA\Property(property="new_password", type="string"), | ||
| * @OA\Property(property="confirm_password", type="string"), | ||
| * example={"current_password": "oldPassword", "new_password": "newPassword", "confirm_password": "newPassword"} | ||
| * ) | ||
| * ) | ||
| * ), | ||
| * @OA\Response( | ||
| * response=200, | ||
| * description="Success", | ||
| * @OA\JsonContent( | ||
| * example={"status": "success", "message": "Updated successfully"} | ||
| * ) | ||
| * ), | ||
| * @OA\Response(response=401, description="Unauthorized Request"), | ||
| * @OA\Response(response=422, description="Unprocessable Entity"), | ||
| * @OA\Response(response=429, description="Too Many Requests"), | ||
| * @OA\Response(response=500, description="Internal Server Error") | ||
| * ) | ||
| */ | ||
| abstract public function updatePassword(Request $request); | ||
| } | ||
|
|
||
|
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.