Browse Source

Update docs

shalvah 4 years ago
parent
commit
7adc1696e7
3 changed files with 12 additions and 13 deletions
  1. 1 1
      docs/config.md
  2. 10 11
      docs/index.md
  3. 1 1
      src/Extracting/Strategies/Responses/ResponseCalls.php

+ 1 - 1
docs/config.md

@@ -68,7 +68,7 @@ For `static` output, the collection will be created in `public/docs/collection.j
 - `auth`: The "Auth" section that should appear in the postman collection. See the [Postman schema docs](https://schema.getpostman.com/json/collection/v2.0.0/docs/index.html) for more information.
 
 ### `openapi`
-Scribe can also generate an OpenAPI (Swagger) spec for your routes. This section is where you can configure or disable that.
+Scribe can also generate an OpenAPI (Swagger) spec for your routes (disabled by default). This section is where you can configure or enable that.
 
 For `static` output, the spec will be created in `public/docs/openapi.yaml`. For `laravel` output, the spec will be generated to `storage/app/scribe/openapi.yaml`. Setting `laravel.add_routes` to `true` will add a `/docs.openapi` endpoint to fetch it.
 

+ 10 - 11
docs/index.md

@@ -12,6 +12,16 @@ Generate API documentation for humans from your Laravel/Lumen/[Dingo](https://gi
 ```eval_rst
 .. Tip:: Looking to document your Node.js APIs? Check out `Scribe for JS <https://github.com/knuckleswtf/scribe-js>`_.
 ```
+## Features
+- Pretty HTML documentation page, with included code samples and friendly text
+- Markdown source files that can be edited to modify docs
+- Extracts body parameters information from FormRequests
+- Safely calls API endpoints to generate sample responses, with authentication and other custom configuration supported
+- Supports generating responses from Transformers or Eloquent API Resources
+- Supports Postman collection and OpenAPI (Swagger) spec generation
+- Included UI components for additional styling
+- Easily customisable with custom views
+- Easily extensible with custom strategies
 
 ## Contents
 ```eval_rst
@@ -31,17 +41,6 @@ Generate API documentation for humans from your Laravel/Lumen/[Dingo](https://gi
    contributing
 ```
 
-## Features
-- Pretty HTML documentation page, with included code samples and friendly text
-- Markdown source files that can be edited to modify docs
-- Extracts body parameters information from FormRequests
-- Safely calls API endpoints to generate sample responses, with authentication and other custom configuration supported
-- Supports generating responses from Transformers or Eloquent API Resources
-- Supports Postman collection and OpenAPI (Swagger) spec generation
-- Included UI components for additional styling
-- Easily customisable with custom views
-- Easily extensible with custom strategies
-
 ## Installation
 PHP 7.2.5 and Laravel/Lumen 5.8 or higher are required.
 

+ 1 - 1
src/Extracting/Strategies/Responses/ResponseCalls.php

@@ -122,7 +122,7 @@ class ResponseCalls extends Strategy
         $method = array_shift($routeMethods);
         $cookies = isset($rulesToApply['cookies']) ? $rulesToApply['cookies'] : [];
 
-        // Note that we initialise the request with the bodyPatams here
+        // Note that we initialise the request with the bodyParams here
         // and later still add them to the ParameterBag (`addBodyParameters`)
         // The first is so the body params get added to the request content
         // (where Laravel reads body from)