Conversation
beesaferoot
left a comment
There was a problem hiding this comment.
Nice! This will be useful as an API deference. I left some minor comments
|
|
||
| - name: Wait for MySQL to be ready | ||
| run: | | ||
| while ! mysqladmin ping -h"127.0.0.1" -P3306 -u root -pwF9zLp2qRxaS2e --silent; do | ||
| sleep 1 | ||
| done |
There was a problem hiding this comment.
I'm curious why we need an elaborate db setup like this?
There was a problem hiding this comment.
Scribe has a lot of different ways to gather information about the API's. It can get this information from PHPDoc, reponsefiles or even types in some cases. Most of our routes do not have any of these. As a fallback, scribe will simply call the endpoint and use the response it gets.
To use this, we basically have to run php artisan scribe:generate in a demo setup.
beesaferoot
left a comment
There was a problem hiding this comment.
This looks great. Already seeing how this make things easier to segment on the docs for subsequent PR.
|
|
||
| // Any extra authentication-related info for your users. Markdown and HTML are supported. | ||
| 'extra_info' => 'You can retrieve your token by visiting your dashboard and clicking <b>Generate API token</b>.', | ||
| 'extra_info' => 'This endpoint **requires authentication**. MicroPowerManager supported different auth mechanism, for example `User` login, `Agent App` login or `API Key`. Please refer to the endpoints documentation to see which applies.', |
There was a problem hiding this comment.
MicroPowerManager supported different typo here i believe you meant MicroPowerManager supports different
|
Superseded by: #1398 |
Brief summary of the change made
This PR implements a few improvements around our OpenAPI docs (and their generation)
Fix

scribe:generateto use actual authentication. Previously most auto generated entries simply showed un-authenticated errorThis now works much better:
Fix some errors thrown related to wrong path of response files
Remove
openapi.yamlfrom version control. It's should be treated like a generated artifact. Update the docs deployment pipeline to generate it on the fly.Note
The motivation for this change is to generally improve and overhaul our API documentation.
As we need to share it with external parties and collaborateurs like Vodacom.
Are there any other side effects of this change that we should be aware of?
Describe how you tested your changes?
Pull Request checklist
Please confirm you have completed any of the necessary steps below.