From b694bdedbf4d9d516e0fd6f95276ab727e4055e7 Mon Sep 17 00:00:00 2001 From: bjauy <1352357+bjauy@users.noreply.github.com> Date: Sun, 20 Sep 2020 13:10:52 +0200 Subject: [PATCH 1/3] Add Laravel 8 support (#781) * Laravel 8 update - first part * Laravel 8 support in Dingo's composer.json --- composer.json | 10 +++++----- dingo.composer.json | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 459247cf..9249c973 100644 --- a/composer.json +++ b/composer.json @@ -18,19 +18,19 @@ "php": ">=7.2.0", "ext-json": "*", "fzaninotto/faker": "^1.8", - "illuminate/console": "^5.7|^6.0|^7.0", - "illuminate/routing": "^5.7|^6.0|^7.0", - "illuminate/support": "^5.7|^6.0|^7.0", + "illuminate/console": "^5.7|^6.0|^7.0|^8.0", + "illuminate/routing": "^5.7|^6.0|^7.0|^8.0", + "illuminate/support": "^5.7|^6.0|^7.0|^8.0", "league/flysystem": "^1.0", "mpociot/documentarian": "^0.4.0", "mpociot/reflection-docblock": "^1.0.1", - "nunomaduro/collision": "^3.0|^4.0", + "nunomaduro/collision": "^3.0|^4.0|^5.0", "ramsey/uuid": "^3.8|^4.0", "symfony/var-exporter": "^4.0|^5.0" }, "require-dev": { "dms/phpunit-arraysubset-asserts": "^0.1.0", - "laravel/lumen-framework": "^5.7|^6.0|^7.0", + "laravel/lumen-framework": "^5.7|^6.0|^7.0|^8.0", "league/fractal": "^0.19.0", "orchestra/testbench": "^3.7|^4.0|^5.0", "phpstan/phpstan": "^0.11.15", diff --git a/dingo.composer.json b/dingo.composer.json index 71c8252b..83004b63 100644 --- a/dingo.composer.json +++ b/dingo.composer.json @@ -18,13 +18,13 @@ "php": ">=7.2.0", "ext-json": "*", "fzaninotto/faker": "^1.8", - "illuminate/console": "^5.7|^6.0|^7.0", - "illuminate/routing": "^5.7|^6.0|^7.0", - "illuminate/support": "^5.7|^6.0|^7.0", + "illuminate/console": "^5.7|^6.0|^7.0|^8.0", + "illuminate/routing": "^5.7|^6.0|^7.0|^8.0", + "illuminate/support": "^5.7|^6.0|^7.0|^8.0", "league/flysystem": "^1.0", "mpociot/documentarian": "^0.4.0", "mpociot/reflection-docblock": "^1.0.1", - "nunomaduro/collision": "^3.0|^4.0", + "nunomaduro/collision": "^3.0|^4.0|^5.0", "ramsey/uuid": "^3.8|^4.0", "symfony/var-exporter": "^4.0|^5.0" }, From 4a7d201ff16111f1abf14b1aa813a9ebb55f90cf Mon Sep 17 00:00:00 2001 From: Marcel Pociot Date: Sun, 20 Sep 2020 11:11:10 +0000 Subject: [PATCH 2/3] Apply fixes from StyleCI --- src/Extracting/Strategies/Metadata/GetFromDocBlocks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Extracting/Strategies/Metadata/GetFromDocBlocks.php b/src/Extracting/Strategies/Metadata/GetFromDocBlocks.php index dcee961a..5edeec32 100644 --- a/src/Extracting/Strategies/Metadata/GetFromDocBlocks.php +++ b/src/Extracting/Strategies/Metadata/GetFromDocBlocks.php @@ -26,7 +26,7 @@ public function __invoke(Route $route, ReflectionClass $controller, ReflectionMe 'groupDescription' => $routeGroupDescription, 'title' => $routeTitle ?: $methodDocBlock->getShortDescription(), 'description' => $methodDocBlock->getLongDescription()->getContents(), - 'authenticated' => $this->getAuthStatusFromDocBlock($classDocBlock->getTags())?:$this->getAuthStatusFromDocBlock($methodDocBlock->getTags()), + 'authenticated' => $this->getAuthStatusFromDocBlock($classDocBlock->getTags()) ?: $this->getAuthStatusFromDocBlock($methodDocBlock->getTags()), ]; } From 80850863940fa6541c8d3d6e98ee18e9181f0a48 Mon Sep 17 00:00:00 2001 From: Sebastian Schlein Date: Thu, 12 Nov 2020 12:44:44 +0100 Subject: [PATCH 3/3] Removing dead links (#795) * Removing dead links * Remove more dead links --- docs/getting-started/generating-documentation.md | 8 ++++---- docs/under-the-hood/how-it-works.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/getting-started/generating-documentation.md b/docs/getting-started/generating-documentation.md index 6f187b76..4deecda9 100644 --- a/docs/getting-started/generating-documentation.md +++ b/docs/getting-started/generating-documentation.md @@ -26,7 +26,7 @@ The base URL used in the Postman collection will be the value of the `base_url` ## Manually modifying the content of the generated documentation If you want to modify the content of your generated documentation without changing the routes, go ahead and edit the generated `index.md` file. -This file is located in the `source` folder of your `output` directory (see [configuration](config.html#output)), so by default, this is `public/docs/source/index.md`. +This file is located in the `source` folder of your `output` directory (see configuration), so by default, this is `public/docs/source/index.md`. After editing the markdown file, you can use the `apidoc:rebuild` command to rebuild your documentation into HTML. @@ -40,7 +40,7 @@ php artisan apidoc:rebuild The contents of `prepend.md` will be added after the front matter and info text, while the contents of `append.md` will be added at the end of the document. ## Specifying language for examples - For each endpoint, an example request is shown in [each language configured](config.html#example-languages). To add a language which is not supported by this package, you'll have to create your own view for how an example should render. Here's how: + For each endpoint, an example request is shown in each language configured. To add a language which is not supported by this package, you'll have to create your own view for how an example should render. Here's how: - Publish the vendor views by running: @@ -54,8 +54,8 @@ php artisan apidoc:rebuild - `methods`: an array of the HTTP methods for that route - `boundUri`: the complete URL for the route, with any url parameters replaced (/users/{id} -> /users/1) - `headers`: key-value array of headers to be sent with route (according to your configuration) -- `cleanQueryParameters`: key-value array of query parameters with example values to be sent with the request. Parameters which have been excluded from the example requests (see [Example Parameters](documenting.html#example-parameters)) will not be present here. -- `cleanBodyParameters`: key-value array of body parameters with example values to be sent with the request. Parameters which have been excluded from the example requests (see [Example Parameters](documenting.html#example-parameters)) will not be present here. +- `cleanQueryParameters`: key-value array of query parameters with example values to be sent with the request. Parameters which have been excluded from the example requests (see Example Parameters at Documenting your API) will not be present here. +- `cleanBodyParameters`: key-value array of body parameters with example values to be sent with the request. Parameters which have been excluded from the example requests (see Example Parameters at Documenting your API will not be present here. - Add the language to the `example_languages` array in the package config. diff --git a/docs/under-the-hood/how-it-works.md b/docs/under-the-hood/how-it-works.md index 1bdf514a..dc7e54b3 100644 --- a/docs/under-the-hood/how-it-works.md +++ b/docs/under-the-hood/how-it-works.md @@ -8,7 +8,7 @@ order: 2 After installing this package and running the command `php artisan apidoc:generate` in your application, here's what happens: - The package fetches all your application's routes. -- It looks through your [configuration file](config.md) to filter the routes to the ones you actually want to document. For each route, it retrieves the settings you want to apply to it, if any. +- It looks through your configuration file to filter the routes to the ones you actually want to document. For each route, it retrieves the settings you want to apply to it, if any. - It processes each route. "Process" here involves using a number of strategies to extract the route's information: group, title, description, body parameters, query parameters, and a sample response, if possible. - After processing the routes, it generates a markdown file describing the routes from the parsed data and passes them to [Documentarian](https://github.com/mpociot/documentarian), which wraps them in a theme and converts them into HTML and CSS. -- It generates a Postman API collection for your routes. ([This can be disabled.](config.html#postman)) +- It generates a Postman API collection for your routes. This can be disabled.