You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/config.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,19 +61,23 @@ For `static` output, the collection will be created in `public/docs/collection.j
61
61
62
62
-`enabled`: Whether or not to generate a Postman API collection. Default: `true`
63
63
64
+
-`overrides`: List of fields to apply to the generated collection. Dot notation is supported. For instance, if you'd like to override the version (in the `info` object, you can set `overrides` to `['info.version' => '2.0.0']`.
65
+
64
66
-`description`: The description for the generated Postman collection.
65
67
66
68
-`base_url`: The base URL to be used in the Postman collection. If this is null, Scribe will use the value of [`base_url`](#base_url) set above.
67
69
68
70
-`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.
69
71
70
72
### `openapi`
71
-
Scribe can also generate an OpenAPI (Swagger) spec for your routes. This section is where you can configure or disable that.
73
+
Scribe can also generate an OpenAPI (Swagger) spec for your routes (disabled by default). This section is where you can configure or enable that.
72
74
73
75
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.
74
76
75
77
-`enabled`: Whether or not to generate an OpenAPI spec. Default: `false`
76
78
79
+
-`overrides`: List of fields to apply to the generated spec. Dot notation is supported. For instance, if you'd like to override the version (in the `info` object, you can set `overrides` to `['info.version' => '2.0.0']`.
80
+
77
81
## Extraction settings
78
82
### `router`
79
83
The router to use when processing your routes. Can be `laravel` or `dingo`. Defaults to `laravel`.
Copy file name to clipboardExpand all lines: docs/generating-documentation.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,8 @@ You can configure Postman collection generation in the `postman` section of your
23
23
24
24
- To turn it off, set the `postman.enabled` config option to false.
25
25
26
+
- To override some fields in the generated collection, set the `openapi.overrides` config option to your changes. You can use dot notation to update specific nested fields. For instance, `['info.version' => '2.0.0']` will override the 'version` key in the 'info` object whenever generating.
27
+
26
28
- The base URL used in the Postman collection is the value of `config('app.url')` by default. To change this, set the value of the `postman.base_url` key.
27
29
28
30
- The name of the Postman collection will be derived from `config('app.name')` by default. To change this, set the value of the `title` key (not in the `postman` array). This will also set the title for your docs HTML page.
@@ -34,6 +36,8 @@ Scribe can also generate an OpenAPI spec file. This is disabled by default. You
34
36
35
37
- To enable it, set the `openapi.enabled` config option to `true`.
36
38
39
+
- To override some fields in the generated spec, set the `openapi.overrides` config option to your changes. You can use dot notation to update specific nested fields. For instance, `['info.version' => '2.0.0']` will override the 'version` key in the 'info` object whenever generating.
40
+
37
41
You can view the generated spec by visiting `public/docs/openapi.yaml` for `static` type, and `<your-app>/docs.openapi` for `laravel` type. This link will also be added to the sidebar of your docs.
0 commit comments