Skip to content

Commit 25c2606

Browse files
derrickmehaffyazulkiplialexkainzingerGeoFropwizla
authored
Strapi v4.0.3 release - Docs (#639)
* auth route v4 (#553) i found that default authentication route should be `/api/auth/local` * fix: typo in backend-customization/middlewares.md (#557) * Update i18n.md (#564) Co-authored-by: Pierre Wizla <[email protected]> * Added API suffix (#556) Co-authored-by: Pierre Wizla <[email protected]> * fix wrong uid (#558) Signed-off-by: harimkims <[email protected]> Co-authored-by: Pierre Wizla <[email protected]> * default route user register in v4 (#554) I found that default route user register in v4 is `api/auth/local/register` Co-authored-by: DMehaffy <[email protected]> Co-authored-by: Pierre Wizla <[email protected]> * Fix remaining localhost links (#568) * Fix wrong syntax in GraphQL plugin docs (#537) Signed-off-by: harimkims <[email protected]> Co-authored-by: Pierre Wizla <[email protected]> * Fix wrong parameter name in connection.connection (#559) In the documentation about the connection parameters, the `username` parameter does not actually exist. This is probably a typo and should be replaced by the `user` parameter as per the example given below on the same page. Co-authored-by: DMehaffy <[email protected]> Co-authored-by: Pierre Wizla <[email protected]> * Fix broken links in GraphQL & i18n (#583) * Update default MySQL Port (#575) Update default MySQL Port in example to 3306 Co-authored-by: Pierre Wizla <[email protected]> * Add closing parenthesis to predefined hook code example (#589) * 📖 ⬆️ bump Mysql/MariaDB minimum verison (#593) - bump MyQL/MariaDB Minimum Version for `JSON` datatype support * Update controllers.md (#586) There should be two enclosing parenthesis at the end. Co-authored-by: Pierre Wizla <[email protected]> * Fix config example for GraphQL (#591) Co-authored-by: Pierre Wizla <[email protected]> * docs: One-to-One should use singular in example (#570) Co-authored-by: Pierre Wizla <[email protected]> * Remaining auth v4 changes (#565) There are still some references to the v3 auth endpoints (without `/api` at the start) on the Users and Permissions plugin documentation. # What does it do? Updates Strapi endpoints to include `/api` at the start # Why is it needed? This change should be documented; it caused a lot of confusion for me as I was trying to figure out why my authentication was not working on v4. # Related issue(s)/PR(s) A similar thing was fixed for the guides in PR #553 Co-authored-by: Pierre Wizla <[email protected]> Co-authored-by: DMehaffy <[email protected]> * lifecycles.js file is not generated automatically (#566) * lifecycles.js file is not generated automatically I think since version 4, the lifecycles.js file is not created automatically but needs to be created manually, if needed. Postscript Correct me if I'm wrong. You can also rephrase this change if it is relevant and true. Thanks * Update docs/developer-docs/latest/development/backend-customization/models.md Co-authored-by: DMehaffy <[email protected]> * Update docs/developer-docs/latest/development/backend-customization/models.md Co-authored-by: Pierre Wizla <[email protected]> Co-authored-by: DMehaffy <[email protected]> Co-authored-by: Pierre Wizla <[email protected]> * Rewrite REST examples to use QS + Misc fixes (#541) * WIP rewriting REST guide * Fix example * rewrite filtering and init the other two * move to request/response instead * remove an example and fix typo * remove another example based on community feedback * add missing $and and $or * 99% finished with filtering * wip population * Try adding some GitHub Actions to check links * fix syntax error in tests file * Force working directory * change to only pull request * Fix publicationState and add field selection * Add relation population examples * Add component exmple * basic dynamic zone example, need a more complex one too Need to talk to engineering about more complex example * Finished rewriting REST docs Just need to clean up left menu * Fix broken links * Fix missing commas in examples * Fix all non-uniform uses of `// ...` Yes I was bored af * fix example response syntax error * Fix extra data comments * remove workflow from this PR move to #574 * pr feedback 1 * Update docs/developer-docs/latest/developer-resources/database-apis-reference/rest-api.md Co-authored-by: Pierre Wizla <[email protected]> * Apply suggestions from code review Co-authored-by: Pierre Wizla <[email protected]> * Update docs/developer-docs/latest/developer-resources/database-apis-reference/rest-api.md Co-authored-by: Pierre Wizla <[email protected]> * Update docs/developer-docs/latest/developer-resources/database-apis-reference/rest-api.md Co-authored-by: Pierre Wizla <[email protected]> * Update docs/developer-docs/latest/developer-resources/database-apis-reference/rest-api.md Co-authored-by: Pierre Wizla <[email protected]> * Update docs/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.md Co-authored-by: Pierre Wizla <[email protected]> * Update docs/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.md Co-authored-by: Pierre Wizla <[email protected]> * Update docs/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.md Co-authored-by: Pierre Wizla <[email protected]> * Update docs/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.md Co-authored-by: Pierre Wizla <[email protected]> * tweak menu + other fixes Co-authored-by: Pierre Wizla <[email protected]> * Corrected: Database.js Structure and key variable (#603) The default structure provided in the doc doesn't work on AWS. The provided syntax which has connection object within connection object which consists of configurations seems to work. username key is being replaced with user * Change strapi.api example from function to array (#539) * Add information about uid and remove model name for upload ref (#614) * Update server.md (#598) * Update i18n docs, fix locale filter typo + autoformat (#609) * Update email.md (#611) Link to correct sendgrid npm * Fix wrong strapi module name for server.js (#615) Signed-off-by: harimkims <[email protected]> * easy syntax corrections in entity-service/crud (#620) * easy syntax correction. should be api:: with double colon * fix typo in entity service example * fix some of the broken links (#626) * Fix typo in configuration options (#619) Configuration options for toggling tutorials on or off and notifying about new releases contained a typo referencing "tutorial" key instead of "tutorials" and "notification.release" instead of "notification.releases" * entityService/populate updates to v4 (#621) * entityService is not function * add await to entityService * some changes entity-service/populate * Update entity-service/populate.md Co-authored-by: DMehaffy <[email protected]> * Update populate.md Co-authored-by: DMehaffy <[email protected]> * typos (#628) * Update upload.md (#616) Typo in "middleware" * Fixed content type export object & missing commas (#627) Without { schema } don`t work( I use v4.0.2 In another plugin: https://github.com/strapi/strapi/blob/master/packages/plugins/users-permissions/server/content-types/index.js * fix(dev/docs): typo `intLabel` to `intlLabel` (#625) * Update services.md (#632) * Update services.md * Update services.md * Fix link formatting in v4 REST API * remove clean flag from build commands (#623) * Update docs/developer-docs/latest/concepts/draft-and-publish.md Co-authored-by: Pierre Wizla <[email protected]> Co-authored-by: azulkipli <[email protected]> Co-authored-by: Alexander Kainzinger <[email protected]> Co-authored-by: George F <[email protected]> Co-authored-by: Pierre Wizla <[email protected]> Co-authored-by: Precious Luke <[email protected]> Co-authored-by: Kim, Harim <[email protected]> Co-authored-by: Camille Briand <[email protected]> Co-authored-by: Adam Miedema <[email protected]> Co-authored-by: YoRolling <[email protected]> Co-authored-by: Zeeshan Tariq <[email protected]> Co-authored-by: smoothdvd <[email protected]> Co-authored-by: arielbk <[email protected]> Co-authored-by: Adiel Ben Moshe <[email protected]> Co-authored-by: Shubam Virdi <[email protected]> Co-authored-by: cvermand <[email protected]> Co-authored-by: Richard Nsama <[email protected]> Co-authored-by: Stefano <[email protected]> Co-authored-by: Jean-Sébastien Herbaux <[email protected]> Co-authored-by: Francesco Bianchi <[email protected]> Co-authored-by: Sharsie <[email protected]> Co-authored-by: sunnyson <[email protected]> Co-authored-by: Jozef Culen <[email protected]> Co-authored-by: Yagor Shtonda <[email protected]> Co-authored-by: Gaurav Sharma <[email protected]> Co-authored-by: Muhammad Umair Irshad <[email protected]>
1 parent 27a45d1 commit 25c2606

File tree

7 files changed

+17
-19
lines changed

7 files changed

+17
-19
lines changed

Diff for: docs/developer-docs/latest/concepts/draft-and-publish.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The draft and publish feature allows you to save your content as a draft, to pub
1010

1111
## Activating or deactivating the draft and publish feature
1212

13-
By default, the draft and publish feature is activated for all newly created collection and single types. It is however possible to deactivate the feature at content type level (i.e. it can be activated for one content type, but deactivated for another).
13+
By default, the draft and publish feature is enabled for all newly created collection and single types. It is however possible to disable the feature at the content-type level (i.e. it can be enabled for one content type, but disabled for another).
1414

1515
::: warning
1616
If the feature is deactivated while contents are saved as drafts, they will automatically be deleted. Make sure all contents are published before deactivating the feature.

Diff for: docs/developer-docs/latest/developer-resources/cli/CLI.md

-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ options: [--no-optimization]
9090
```
9191

9292
- **strapi build**<br/>
93-
Builds the administration panel and minimizing the assets
94-
- **strapi build --clean**<br/>
9593
Builds the administration panel and delete the previous build and .cache folders
9694
- **strapi build --no-optimization**<br/>
9795
Builds the administration panel without minimizing the assets. The build duration is faster.

Diff for: docs/developer-docs/latest/developer-resources/database-apis-reference/rest-api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ canonicalUrl: https://docs.strapi.io/developer-docs/latest/developer-resources/d
99

1010
The REST API allows accessing the [content-types](/developer-docs/latest/development/backend-customization/models.md#content-types) through API endpoints that Strapi automatically creates.
1111

12-
[API parameters](#api-parameters) can be used to [filter](/developer-docs/latest/developer-resources/database-apis-reference/rest/filtering-locale-publication.md#filtering), [sort](/developer-docs/latest/developer-resources/database-apis-reference/rest/sort-pagination.md#sorting), and [paginate](/developer-docs/latest/developer-resources/database-apis-reference/rest/sort-pagination.md#pagination) results and to [select fields](/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.md#field-selection) and relations to [populate](/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.md#population)). Additionally, specific parameters related to optional Strapi features can be used, like [publication state](/developer-docs/latest/developer-resources/database-apis-reference/rest/filtering-locale-publication.md#publication-state) and [locale](/developer-docs/latest/developer-resources/database-apis-reference/rest/filtering-locale-publication.md#locale.
12+
[API parameters](#api-parameters) can be used to [filter](/developer-docs/latest/developer-resources/database-apis-reference/rest/filtering-locale-publication.md#filtering), [sort](/developer-docs/latest/developer-resources/database-apis-reference/rest/sort-pagination.md#sorting), and [paginate](/developer-docs/latest/developer-resources/database-apis-reference/rest/sort-pagination.md#pagination) results and to [select fields](/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.md#field-selection) and relations to [populate](/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.md#population)). Additionally, specific parameters related to optional Strapi features can be used, like [publication state](/developer-docs/latest/developer-resources/database-apis-reference/rest/filtering-locale-publication.md#publication-state) and [locale](/developer-docs/latest/developer-resources/database-apis-reference/rest/filtering-locale-publication.md#locale).
1313

1414
## API Parameters
1515

Diff for: docs/developer-docs/latest/developer-resources/plugin-api-reference/admin-panel.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export default {
290290
{ id: String, intlLabel: { id: String, defaultMessage: String }, // Section to create
291291
[ // links
292292
{
293-
intLabel: { id: String, defaultMessage: String },
293+
intlLabel: { id: String, defaultMessage: String },
294294
id: String,
295295
to: String,
296296
Component: myComponent,
@@ -325,7 +325,7 @@ export default {
325325
app.addSettingsLink(
326326
'global', // id of the section to add the link to
327327
{
328-
intLabel: { id: String, defaultMessage: String },
328+
intlLabel: { id: String, defaultMessage: String },
329329
id: String,
330330
to: String,
331331
Component: myComponent,
@@ -361,7 +361,7 @@ export default {
361361
app.addSettingsLinks(
362362
'global', // id of the section to add the link in
363363
[{
364-
intLabel: { id: String, defaultMessage: String },
364+
intlLabel: { id: String, defaultMessage: String },
365365
id: String,
366366
to: String,
367367
Component: myComponent,

Diff for: docs/developer-docs/latest/developer-resources/plugin-api-reference/server.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ const contentTypeA = require('./content-type-a');
141141
const contentTypeB = require('./content-type-b');
142142

143143
module.exports = {
144-
'content-type-a': contentTypeA, // should re-use the singularName of the content-type
145-
'content-type-b': contentTypeB,
144+
'content-type-a': { schema: contentTypeA }, // should re-use the singularName of the content-type
145+
'content-type-b': { schema: contentTypeB },
146146
};
147147
```
148148

@@ -156,25 +156,25 @@ module.exports = {
156156
pluralName: 'content-type-as', // kebab-case mandatory
157157
displayName: 'Content Type A',
158158
description: 'A regular content type',
159-
kind: 'collectionType'
159+
kind: 'collectionType',
160160
},
161161
options: {
162162
draftAndPublish: true,
163163
},
164164
pluginOptions: {
165165
'content-manager': {
166-
visible: false
166+
visible: false,
167167
},
168168
'content-type-builder': {
169-
visible: false
169+
visible: false,
170170
}
171171
},
172172
attributes: {
173173
name: {
174174
type: 'string',
175175
min: 1,
176176
max: 50,
177-
configurable: false
177+
configurable: false,
178178
},
179179
}
180180
};
@@ -195,7 +195,7 @@ const routes = require('./routes');
195195

196196
module.exports = () => ({
197197
routes,
198-
type: 'content-api' // can also be 'admin-api' depending on the type of route
198+
type: 'content-api', // can also be 'admin-api' depending on the type of route
199199
});
200200
```
201201

Diff for: docs/developer-docs/latest/development/backend-customization/services.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ module.exports = createCoreService('api::restaurant.restaurant', ({ strapi }) =>
5858
async findOne(entityId, params = {}) {
5959
return strapi.entityService.findOne('api::restaurant.restaurant', entityId, this.getFetchParams(params));
6060
}
61-
});
61+
}));
6262
```
6363

6464
::: strapi Entity Service API
@@ -97,7 +97,7 @@ module.exports = createCoreService('api::restaurant.restaurant', ({ strapi }) =>
9797
// Return a promise of the function that sends the email.
9898
return transporter.sendMail(options);
9999
},
100-
});
100+
}));
101101
```
102102

103103
The service is now available through the `strapi.service('api::email.email').send(...args)` global variable. It can be used in another part of the codebase, like in the following controller:
@@ -121,7 +121,7 @@ module.exports = createCoreController('api::restaurant.restaurant', ({ strapi })
121121
ok: true,
122122
});
123123
},
124-
});
124+
}));
125125
```
126126

127127
::::

Diff for: docs/developer-docs/latest/update-migration-guides/update-version.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ Rebuild the admin panel with one of the following commands:
7979

8080
<code-block title="NPM">
8181
```sh
82-
npm run build -- --clean
82+
npm run build
8383
```
8484
</code-block>
8585

8686
<code-block title="YARN">
8787
```sh
88-
yarn build --clean
88+
yarn build
8989
```
9090
</code-block>
9191

0 commit comments

Comments
 (0)