Skip to content

Commit 9c46db3

Browse files
committed
Update docs
1 parent 4d3648f commit 9c46db3

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

config/scribe.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
],
8383

8484
/*
85-
* Text to place in the "Introduction" section. Markdown and HTML are supported.
85+
* Text to place in the "Introduction" section, right after the `description`. Markdown and HTML are supported.
8686
*/
8787
'intro_text' => <<<INTRO
8888
Welcome to our API documentation!

docs/config.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ The text to place in the "Introduction" section. Markdown and HTML are supported
3838
### `title`
3939
The HTML `<title>` for the generated documentation, and the name of the generated Postman collection. If this is `null`, Scribe will infer it from `config('app.name')`.
4040

41+
### `description`
42+
A description for your API. This will be placed in the "Introduction" section, before the `intro_text`. It will also be used as the `info.description` field in the generated Postman collection and OpenAPI spec.
43+
4144
### `logo`
4245
Path to an image file to use as your logo in the generated docs. This will be used as the value of the src attribute for the `<img>` tag, so make sure it points to a public URL or path accessible from your web server. For best results, the image width should be 230px. Set this to `false` if you're not using a logo. Default: `false`.
4346

@@ -83,6 +86,7 @@ The router to use when processing your routes. Can be `laravel` or `dingo`. Defa
8386
### `auth`
8487
Authentication information about your API. This information will be used:
8588
- to derive the text in the "Authentication" section in the generated docs
89+
- to generate auth info in the Postman collection and OpenAPI spec
8690
- to add the auth headers/query parameters/body parameters to the docs and example requests
8791
- to set the auth headers/query parameters/body parameters for response calls
8892

docs/plugins.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,15 @@ Each strategy class must implement the `__invoke` method with the parameters as
209209
'authenticated' // boolean
210210
```
211211

212-
- In the `urlParameters`, `queryParameters`, and `bodyParameters` stages, you can return an array with arbitrary keys. These keys will be the names of your parameters. Array keys can be indicated with Laravel's dot notation. The value of each key should be an array with the following keys:
212+
- In the `urlParameters`, `queryParameters`, and `bodyParameters` stages, you can return an array with arbitrary keys. These keys will be the names of your parameters. Array keys can be indicated with Laravel's dot notation. The value of each key should be an array with the following structure:
213213

214-
```
215-
'type', // Only valid in bodyParameters
216-
'description',
217-
'required', // boolean
218-
'value', // An example value for the parameter
214+
```php
215+
[
216+
'type' => 'valid type',
217+
'description' => 'An optional description.',
218+
'required => true, // or false
219+
'value' => "An example value for the parameter",
220+
];
219221
```
220222

221223
```eval_rst
@@ -244,9 +246,11 @@ Each strategy class must implement the `__invoke` method with the parameters as
244246
```
245247

246248

247-
- In the `responseFields` stage, you can return an array with arbitrary keys. These keys will be the names of fields in your response. The value of each key should be an array with the following keys:
249+
- In the `responseFields` stage, you can return an array with arbitrary keys. These keys will be the names of fields in your response. The value of each key should be an array with the following structure:
248250

249251
```
250-
'type',
251-
'description',
252+
[
253+
'type' => '',
254+
'description' => '',
255+
]
252256
```

0 commit comments

Comments
 (0)