Browse Source

Update docs

shalvah 5 years ago
parent
commit
811d3987e2
6 changed files with 29 additions and 3 deletions
  1. 1 0
      CHANGELOG.md
  2. 3 1
      README.md
  3. 2 0
      docs/config.md
  4. 1 1
      docs/generating-documentation.md
  5. 1 0
      docs/index.md
  6. 21 1
      docs/migrating.md

+ 1 - 0
CHANGELOG.md

@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## [4.0.0] 
 ### Added
+- Support for non-static docs, changed source files locations (https://github.com/mpociot/laravel-apidoc-generator/pull/608)
 - Support for Eloquent API resources (https://github.com/mpociot/laravel-apidoc-generator/pull/601)
 - `bindings` replaced by `@urlParam` annotation (https://github.com/mpociot/laravel-apidoc-generator/pull/599)
 - Better support for arrays and objects in bodyParams (https://github.com/mpociot/laravel-apidoc-generator/pull/597)

+ 3 - 1
README.md

@@ -12,7 +12,9 @@ Automatically generate your API documentation from your existing Laravel/Lumen/[
 [![StyleCI](https://styleci.io/repos/57999295/shield?style=flat)](https://styleci.io/repos/57999295)
 
 ## Installation
-PHP 7 and Laravel 5.5 or higher are required.
+PHP 7.2 and Laravel 5.7 or higher are required.
+
+> If your application does not meet these requirements, you can check out the 3.x branch for older releases.
 
 ```sh
 composer require --dev mpociot/laravel-apidoc-generator

+ 2 - 0
docs/config.md

@@ -7,6 +7,8 @@ This is the type of documentation output to generate.
 - `static` will generate a static HTMl page in the `public/docs` folder, so anyone can visit your documentation page by going to {yourapp.domain}/docs.
 - `laravel` will generate the documentation as a Blade view within the `resources/views/apidoc` folder, so you can add routing and authentication.
 
+> In both instances, the source markdown file will be generated in `resources/docs/source`.
+
 If you're using `laravel` type, you can call `\Mpociot\ApiDoc\ApiDoc::routes()` from your routes file (usually `routes/web.php`). This method will create a `/doc` route for your documentation, along with a `/doc.json` variant that will return the Postman collection, if you have that enabled. This method returns the route, so you can call additional methods to customise it (by adding middleware, for instance). You can also pass in the path you'd like to use instead.
 
 ```php

+ 1 - 1
docs/generating-documentation.md

@@ -32,7 +32,7 @@ php artisan apidoc:rebuild
 ```
 
 ## Automatically add markdown to the beginning or end of the documentation
- If you wish to automatically add the same content to the docs every time you generate (for instance, an introduction, a disclaimer or an authenticatino guide), you can add a `prepend.md` and/or `append.md` file to the `source` folder in the `output` directory, and they will be added to the generated documentation. 
+ If you wish to automatically add the same content to the docs every time you generate (for instance, an introduction, a disclaimer or an authenticatino guide), you can add a `prepend.md` and/or `append.md` file to the `source` folder in the source output directory (`resources/docs/source`), and they will be added to the generated documentation. 
  
  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.
  

+ 1 - 0
docs/index.md

@@ -7,6 +7,7 @@ Automatically generate your API documentation from your existing Laravel/Lumen/[
 ## Contents
 * [How This Works](description.md)
 * [Configuration](config.md)
+* [Migrating from v3 to v4](migrating.md)
 * [Generating Documentation](generating-documentation.md)
 * [Documenting Your API](documenting.md)
 * [Extending functionality with plugins](plugins.md)

+ 21 - 1
docs/migrating.md

@@ -1,2 +1,22 @@
 # Migrating
-Rename your old config file. Publish the config file
+- Version requirement: PHP 7.2 and Laravel 5.7
+
+- Rename your old config file. Publish the new config file and copy over any changes you made to the old one.
+
+- Rename your old vendor view (if published). Publish the new vendor view and copy over any changes you made to the old one.
+
+- Migrate `bindings` to `@urlParam`
+
+- Remove `response_calls.bindings`
+
+- Rename `query` and `body` in `response_calls` config to `queryParams` and `bodyParams`
+
+- Move any `apply.response_calls.headers` to `apply.headers`
+
+- Move any prepend/append files to new location (resources/docs/source)
+
+- Verify that any custom strategies match the new signatures
+
+- Modify any custom language views to match new parameters (`metadata`)
+
+- See changelog for details