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
By default, this feature is **disabled** in local environment and **enabled** in production.
191
-
To change this behaviour[Publish the configs](#publishing-configs) and change `protect-private-docs`.
142
+
To change this behavior,[Publish the configs](#publishing-configs) and change `protect-private-docs`.
192
143
193
144
Private documentations route is protected with the `auth:web` middleware.
194
-
You can grant users access to the protected docs by updating `access-private-docs-roles`&
145
+
You can grant users access to the protected docs by updating `access-private-docs-roles`and
195
146
`access-private-docs-permission` values in documentation config.
196
147
By default, users need `access-private-docs` permission to access private docs.
197
148
198
-
### Edit Default Generated Values in Templates {#edit-default-generated-values-in-templates}
149
+
##Documentation Header Localization
199
150
200
-
Apiato by defaults generates 2 API documentations, each one has its own `apidoc.json` file. Both can be modified from
201
-
the Documentation Container in `app/Containers/Vendor/Documentation/ApiDocJs` and need Source code modification.
151
+
The documentation header is in English `en` by default.
152
+
To see the documentation header in another language, you can change the locale in the `.env` file.
202
153
203
-
### Edit the Documentation Header {#edit-the-documentation-header}
204
-
205
-
The header is usually the Overview of your API. It contains Info about authenticating users, making requests, responses, potential errors, rate limiting, pagination, query parameters and anything you want.
206
-
207
-
All this information is written in `app/Containers/Vendor/Documentation/ApiDocJs/shared/header.template.en.md` file, and the same file is used as header for both private and public documentations.
208
-
209
-
To edit its content you need to modify its source code and open the markdown file in any markdown editor and edit it.
210
-
211
-
You will notice some variables like `{{rate-limit}}` and `{{token-expires}}`. Those are replaced when running `apiato:apidoc` with real values from your application configuration files.
212
-
213
-
Feel free to extend them to include more info about your API from the `app/Containers/Vendor/Documentation/Tasks/RenderTemplatesTask.php` class.
214
-
215
-
### Localization for Documentation Header {#localization-for-documentation-header}
216
-
217
-
Default, the documentation title is in English `en` localization.
218
-
219
-
See which locales are supported by going in `app/Containers/Vendor/Documentation/ApiDocJs/shared`
220
-
221
-
There will be some `header.template.{locale}.md` files in the folder.
222
-
223
-
You can change the language by adding `APIDOC_LOCALE=ru` to the `.env` file.
154
+
```shell
155
+
APIDOC_LOCALE=ru
156
+
```
224
157
225
-
If you didn't find a file with your locale, you can create it. You need to modify its source code and create new file like `header.template.cn.md`
158
+
To see the list of supported locales, check the `app/Containers/Vendor/Documentation/ApiDocJs/shared` folder.
159
+
If you want to add a new language, you can create a new file in the `shared` folder and submit a PR.
0 commit comments