Forráskód Böngészése

More docs cleanup

shalvah 5 éve
szülő
commit
6863189588

+ 9 - 6
docs/documenting-endpoint-responses.md

@@ -122,7 +122,7 @@ This JSON string will be parsed and merged with the response from the file.
 If you don't specify an example response using any of the other means described in this document, Scribe will attempt to get a sample response by making a HTTP request to the local endpoint (known as a "response call").
 
 ```eval_rst
-.. Important:: Response calls are done within a database transaction and changes are rolled back afterwards, so no data is persisted.
+.. Note:: Response calls are done within a database transaction and changes are rolled back afterwards, so no data is persisted.
 ```
 
 The configuration for response calls is located in the `apply.response_calls` section for each route group in `config/scribe.php`. This means that You can apply different settings for different sets of routes. Here are some important things to note:
@@ -142,7 +142,7 @@ The configuration for response calls is located in the `apply.response_calls` se
 ```
 
 ```eval_rst
-.. Note:: Unlike the other approaches described in this document, the `ResponseCalls` strategy will only attempt to fetch a response if there are no responses with a status code of 2xx already.
+.. Note:: Unlike the other approaches described in this document, the :code:`ResponseCalls` strategy will only attempt to fetch a response if there are no responses with a status code of 2xx already.
 ```
 
 ## `@apiResource`, `@apiResourceCollection`, and `@apiResourceModel`
@@ -222,7 +222,7 @@ If you're using transformers (via the league/fractal package), you can tell Scri
  
 
 ```eval_rst
-.. Tip:: Specifying `@transformerModel` is optional. If you don't specify it, Scribe will attempt to use the class of the first parameter to the transformer's `transform()` method.
+.. Tip:: Specifying :code:`@transformerModel` is optional. If you don't specify it, Scribe will attempt to use the class of the first parameter to the transformer's :code:`transform()` method.
 ```
 
 For example:
@@ -321,15 +321,18 @@ Scribe figures out the type of the field from the 2xx responses for that endpoin
 ```eval_rst
 .. Tip:: You don't need to specify the full field path if the field is inside an array of objects or wrapped in pagination data. For instance, the above annotation will work fine for all of these responses:
 
-   .. code:: json 
+  .. code:: json 
+  
      { "id": 3 }
 
-   .. code:: json 
+  .. code:: json 
+
       [
         { "id": 3 }
       ]
 
-   .. code:: json 
+  .. code:: json 
+
       {
          "data": [
            { "id": 3 }

+ 1 - 1
docs/generating-documentation.md

@@ -17,7 +17,7 @@ Accessing your generated docs depends on the `type` you specified in `scribe.php
 - If you're using `laravel` type, start your app (`php artisan serve`), then visit `/docs`.
 
 ## Postman collection generation
-By default, a Postman collection file, which you can import into API clients like Postman or Insomnia is generated alongside your docs. You can get it by visiting `public/docs/collection.json` for `static` type, and `<your-app>/docs.json` for `laravel` type.
+By default, a Postman collection file which you can import into API clients like Postman or Insomnia is generated alongside your docs. You can view it by visiting `public/docs/collection.json` for `static` type, and `<your-app>/docs.json` for `laravel` type. This link will also be added to the sidebar of your docs.
 
 You can configure Postman collection generation in the `postman` section of your `scribe.php` file.
 

+ 2 - 0
docs/troubleshooting.md

@@ -8,3 +8,5 @@ If you need to see the full stack trace, you can run the command again with the
 
 ## Turn on debug mode for your app
 Sometimes you may see a 500 `null` response shown in the generated examples. This is usually because an error occured within your application during a response call. The quickest way to debug this is by setting `app.debug` to `true` in your `response_calls.config` section in your `scribe.php` file. Alternatively, you can set `APP_DEBUG=true` in your `.env.docs` file and run the command with `--env docs`.  
+
+## Be sure you're accessing your docs correctly