@loopback/docs 5.1.0 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/package.json +3 -3
- package/site/BelongsTo-relation.md +1 -1
- package/site/Context.md +1 -1
- package/site/Crafting-LoopBack-4.md +3 -3
- package/site/DEVELOPING.md +2 -2
- package/site/Dynamic-models-repositories-controllers.md +2 -2
- package/site/Implementing-features.shelved.md +1 -1
- package/site/Include-filter.md +1 -1
- package/site/Interceptor-generator.md +1 -1
- package/site/LB3-vs-LB4-request-response-cycle.md +4 -4
- package/site/Model-generator.md +1 -1
- package/site/Model.md +2 -2
- package/site/Polymorphic-relation.md +1 -1
- package/site/REST-middleware-sequence.md +1 -1
- package/site/Repository-generator.md +2 -2
- package/site/Repository.md +1 -1
- package/site/Request-response-cycle.md +6 -6
- package/site/Serving-static-files.md +1 -1
- package/site/Testing-your-application.md +1 -1
- package/site/apidocs/repository.defaultcrudrepository.definepersistedmodel.md +1 -1
- package/site/apidocs/repository.defaultcrudrepository.md +1 -1
- package/site/changelogs/bodyparsers/rest-msgpack/CHANGELOG.md +8 -0
- package/site/changelogs/examples/access-control-migration/CHANGELOG.md +8 -0
- package/site/changelogs/examples/binding-resolution/CHANGELOG.md +8 -0
- package/site/changelogs/examples/context/CHANGELOG.md +8 -0
- package/site/changelogs/examples/express-composition/CHANGELOG.md +8 -0
- package/site/changelogs/examples/file-transfer/CHANGELOG.md +8 -0
- package/site/changelogs/examples/graphql/CHANGELOG.md +8 -0
- package/site/changelogs/examples/greeter-extension/CHANGELOG.md +8 -0
- package/site/changelogs/examples/greeting-app/CHANGELOG.md +8 -0
- package/site/changelogs/examples/hello-world/CHANGELOG.md +8 -0
- package/site/changelogs/examples/lb3-application/CHANGELOG.md +8 -0
- package/site/changelogs/examples/log-extension/CHANGELOG.md +8 -0
- package/site/changelogs/examples/metrics-prometheus/CHANGELOG.md +8 -0
- package/site/changelogs/examples/multi-tenancy/CHANGELOG.md +9 -1
- package/site/changelogs/examples/passport-login/CHANGELOG.md +8 -0
- package/site/changelogs/examples/references-many/CHANGELOG.md +8 -0
- package/site/changelogs/examples/rest-crud/CHANGELOG.md +8 -0
- package/site/changelogs/examples/rpc-server/CHANGELOG.md +8 -0
- package/site/changelogs/examples/soap-calculator/CHANGELOG.md +8 -0
- package/site/changelogs/examples/socketio/CHANGELOG.md +8 -0
- package/site/changelogs/examples/todo/CHANGELOG.md +8 -0
- package/site/changelogs/examples/todo-jwt/CHANGELOG.md +8 -0
- package/site/changelogs/examples/todo-list/CHANGELOG.md +8 -0
- package/site/changelogs/examples/validation-app/CHANGELOG.md +8 -0
- package/site/changelogs/examples/webpack/CHANGELOG.md +8 -0
- package/site/changelogs/extensions/apiconnect/CHANGELOG.md +8 -0
- package/site/changelogs/extensions/authentication-jwt/CHANGELOG.md +8 -0
- package/site/changelogs/extensions/authentication-passport/CHANGELOG.md +8 -0
- package/site/changelogs/extensions/context-explorer/CHANGELOG.md +8 -0
- package/site/changelogs/extensions/cron/CHANGELOG.md +8 -0
- package/site/changelogs/extensions/graphql/CHANGELOG.md +8 -0
- package/site/changelogs/extensions/health/CHANGELOG.md +8 -0
- package/site/changelogs/extensions/logging/CHANGELOG.md +8 -0
- package/site/changelogs/extensions/metrics/CHANGELOG.md +8 -0
- package/site/changelogs/extensions/pooling/CHANGELOG.md +8 -0
- package/site/changelogs/extensions/socketio/CHANGELOG.md +8 -0
- package/site/changelogs/extensions/typeorm/CHANGELOG.md +8 -0
- package/site/changelogs/fixtures/mock-oauth2-provider/CHANGELOG.md +8 -0
- package/site/changelogs/packages/authentication/CHANGELOG.md +8 -0
- package/site/changelogs/packages/authorization/CHANGELOG.md +8 -0
- package/site/changelogs/packages/boot/CHANGELOG.md +8 -0
- package/site/changelogs/packages/booter-lb3app/CHANGELOG.md +8 -0
- package/site/changelogs/packages/build/CHANGELOG.md +12 -0
- package/site/changelogs/packages/cli/CHANGELOG.md +18 -0
- package/site/changelogs/packages/context/CHANGELOG.md +8 -0
- package/site/changelogs/packages/core/CHANGELOG.md +8 -0
- package/site/changelogs/packages/eslint-config/CHANGELOG.md +8 -0
- package/site/changelogs/packages/express/CHANGELOG.md +8 -0
- package/site/changelogs/packages/filter/CHANGELOG.md +11 -0
- package/site/changelogs/packages/http-caching-proxy/CHANGELOG.md +8 -0
- package/site/changelogs/packages/http-server/CHANGELOG.md +8 -0
- package/site/changelogs/packages/metadata/CHANGELOG.md +8 -0
- package/site/changelogs/packages/model-api-builder/CHANGELOG.md +8 -0
- package/site/changelogs/packages/monorepo/CHANGELOG.md +8 -0
- package/site/changelogs/packages/openapi-spec-builder/CHANGELOG.md +16 -0
- package/site/changelogs/packages/openapi-v3/CHANGELOG.md +8 -0
- package/site/changelogs/packages/repository/CHANGELOG.md +11 -0
- package/site/changelogs/packages/repository-json-schema/CHANGELOG.md +11 -0
- package/site/changelogs/packages/repository-tests/CHANGELOG.md +8 -0
- package/site/changelogs/packages/rest/CHANGELOG.md +8 -0
- package/site/changelogs/packages/rest-crud/CHANGELOG.md +11 -0
- package/site/changelogs/packages/rest-explorer/CHANGELOG.md +8 -0
- package/site/changelogs/packages/security/CHANGELOG.md +8 -0
- package/site/changelogs/packages/service-proxy/CHANGELOG.md +8 -0
- package/site/changelogs/packages/testlab/CHANGELOG.md +8 -0
- package/site/changelogs/packages/tsdocs/CHANGELOG.md +8 -0
- package/site/decorators/Decorators_openapi.md +3 -3
- package/site/deployment/Deploy-for-GDPR-readiness.md +1 -1
- package/site/migration/LB3-vs-LB4-booting.md +1 -1
- package/site/migration/auth/passport.md +2 -2
- package/site/readmes/loopback-next/examples/lb3-application/README.md +1 -1
- package/site/readmes/loopback-next/examples/log-extension/README.md +1 -1
- package/site/readmes/loopback-next/examples/rest-crud/README.md +1 -1
- package/site/readmes/loopback-next/examples/todo-jwt/README.md +1 -1
- package/site/readmes/loopback-next/packages/boot/README.md +1 -1
- package/site/readmes/loopback-next/packages/build/README.md +2 -2
- package/site/readmes/loopback-next/packages/rest-crud/README.md +1 -1
- package/site/tutorials/core/11-summary.md +1 -1
- package/site/tutorials/core/3-context-in-action.md +3 -3
- package/site/tutorials/soap-calculator/soap-calculator-tutorial-add-controller.md +1 -1
- package/site/tutorials/soap-calculator/soap-calculator-tutorial-scaffolding.md +1 -1
|
@@ -13,6 +13,22 @@ permalink: /doc/en/lb4/changelog.openapi-spec-builder.html
|
|
|
13
13
|
All notable changes to this project will be documented in this file.
|
|
14
14
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
15
15
|
|
|
16
|
+
## [5.0.2](https://github.com/loopbackio/loopback-next/compare/@loopback/openapi-spec-builder@5.0.1...@loopback/openapi-spec-builder@5.0.2) (2022-07-14)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @loopback/openapi-spec-builder
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## [5.0.1](https://github.com/loopbackio/loopback-next/compare/@loopback/openapi-spec-builder@5.0.0...@loopback/openapi-spec-builder@5.0.1) (2022-06-13)
|
|
25
|
+
|
|
26
|
+
**Note:** Version bump only for package @loopback/openapi-spec-builder
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
16
32
|
## [5.0.0](https://github.com/loopbackio/loopback-next/compare/@loopback/openapi-spec-builder@4.1.2...@loopback/openapi-spec-builder@5.0.0) (2022-05-05)
|
|
17
33
|
|
|
18
34
|
|
|
@@ -13,6 +13,14 @@ permalink: /doc/en/lb4/changelog.openapi-v3.html
|
|
|
13
13
|
All notable changes to this project will be documented in this file.
|
|
14
14
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
15
15
|
|
|
16
|
+
## [8.0.1](https://github.com/loopbackio/loopback-next/compare/@loopback/openapi-v3@8.0.0...@loopback/openapi-v3@8.0.1) (2022-06-13)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @loopback/openapi-v3
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
16
24
|
## [8.0.0](https://github.com/loopbackio/loopback-next/compare/@loopback/openapi-v3@7.1.2...@loopback/openapi-v3@8.0.0) (2022-05-05)
|
|
17
25
|
|
|
18
26
|
|
|
@@ -13,6 +13,17 @@ permalink: /doc/en/lb4/changelog.repository.html
|
|
|
13
13
|
All notable changes to this project will be documented in this file.
|
|
14
14
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
15
15
|
|
|
16
|
+
## [5.0.1](https://github.com/loopbackio/loopback-next/compare/@loopback/repository@5.0.0...@loopback/repository@5.0.1) (2022-06-13)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* fix build errors for TypeScript 4.7.x ([cf8eafd](https://github.com/loopbackio/loopback-next/commit/cf8eafd2fce8b833400be5303f0b15bfbb27f14b))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
16
27
|
## [5.0.0](https://github.com/loopbackio/loopback-next/compare/@loopback/repository@4.1.2...@loopback/repository@5.0.0) (2022-05-05)
|
|
17
28
|
|
|
18
29
|
|
|
@@ -13,6 +13,17 @@ permalink: /doc/en/lb4/changelog.repository-json-schema.html
|
|
|
13
13
|
All notable changes to this project will be documented in this file.
|
|
14
14
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
15
15
|
|
|
16
|
+
## [6.0.1](https://github.com/loopbackio/loopback-next/compare/@loopback/repository-json-schema@6.0.0...@loopback/repository-json-schema@6.0.1) (2022-06-13)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* fix build errors for TypeScript 4.7.x ([cf8eafd](https://github.com/loopbackio/loopback-next/commit/cf8eafd2fce8b833400be5303f0b15bfbb27f14b))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
16
27
|
## [6.0.0](https://github.com/loopbackio/loopback-next/compare/@loopback/repository-json-schema@5.1.2...@loopback/repository-json-schema@6.0.0) (2022-05-05)
|
|
17
28
|
|
|
18
29
|
|
|
@@ -13,6 +13,14 @@ permalink: /doc/en/lb4/changelog.repository-tests.html
|
|
|
13
13
|
All notable changes to this project will be documented in this file.
|
|
14
14
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
15
15
|
|
|
16
|
+
## [0.21.1](https://github.com/loopbackio/loopback-next/compare/@loopback/repository-tests@0.21.0...@loopback/repository-tests@0.21.1) (2022-06-13)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @loopback/repository-tests
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
16
24
|
## [0.21.0](https://github.com/loopbackio/loopback-next/compare/@loopback/repository-tests@0.20.2...@loopback/repository-tests@0.21.0) (2022-05-05)
|
|
17
25
|
|
|
18
26
|
|
|
@@ -13,6 +13,14 @@ permalink: /doc/en/lb4/changelog.rest.html
|
|
|
13
13
|
All notable changes to this project will be documented in this file.
|
|
14
14
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
15
15
|
|
|
16
|
+
## [12.0.1](https://github.com/loopbackio/loopback-next/compare/@loopback/rest@12.0.0...@loopback/rest@12.0.1) (2022-06-13)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @loopback/rest
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
16
24
|
## [12.0.0](https://github.com/loopbackio/loopback-next/compare/@loopback/rest@11.1.2...@loopback/rest@12.0.0) (2022-05-05)
|
|
17
25
|
|
|
18
26
|
|
|
@@ -13,6 +13,17 @@ permalink: /doc/en/lb4/changelog.rest-crud.html
|
|
|
13
13
|
All notable changes to this project will be documented in this file.
|
|
14
14
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
15
15
|
|
|
16
|
+
# [0.15.0](https://github.com/loopbackio/loopback-next/compare/@loopback/rest-crud@0.14.0...@loopback/rest-crud@0.15.0) (2022-06-13)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* **rest-crud:** add option to create readonly rest-crud apis ([6ae1423](https://github.com/loopbackio/loopback-next/commit/6ae142302ca61363a357559ba42243bdaf4f7256))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
16
27
|
## [0.14.0](https://github.com/loopbackio/loopback-next/compare/@loopback/rest-crud@0.13.2...@loopback/rest-crud@0.14.0) (2022-05-05)
|
|
17
28
|
|
|
18
29
|
|
|
@@ -13,6 +13,14 @@ permalink: /doc/en/lb4/changelog.rest-explorer.html
|
|
|
13
13
|
All notable changes to this project will be documented in this file.
|
|
14
14
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
15
15
|
|
|
16
|
+
## [5.0.1](https://github.com/loopbackio/loopback-next/compare/@loopback/rest-explorer@5.0.0...@loopback/rest-explorer@5.0.1) (2022-06-13)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @loopback/rest-explorer
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
16
24
|
## [5.0.0](https://github.com/loopbackio/loopback-next/compare/@loopback/rest-explorer@4.1.2...@loopback/rest-explorer@5.0.0) (2022-05-05)
|
|
17
25
|
|
|
18
26
|
|
|
@@ -13,6 +13,14 @@ permalink: /doc/en/lb4/changelog.security.html
|
|
|
13
13
|
All notable changes to this project will be documented in this file.
|
|
14
14
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
15
15
|
|
|
16
|
+
## [0.8.1](https://github.com/loopbackio/loopback-next/compare/@loopback/security@0.8.0...@loopback/security@0.8.1) (2022-06-13)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @loopback/security
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
16
24
|
## [0.8.0](https://github.com/loopbackio/loopback-next/compare/@loopback/security@0.7.2...@loopback/security@0.8.0) (2022-05-05)
|
|
17
25
|
|
|
18
26
|
|
|
@@ -13,6 +13,14 @@ permalink: /doc/en/lb4/changelog.service-proxy.html
|
|
|
13
13
|
All notable changes to this project will be documented in this file.
|
|
14
14
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
15
15
|
|
|
16
|
+
## [5.0.1](https://github.com/loopbackio/loopback-next/compare/@loopback/service-proxy@5.0.0...@loopback/service-proxy@5.0.1) (2022-06-13)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @loopback/service-proxy
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
16
24
|
## [5.0.0](https://github.com/loopbackio/loopback-next/compare/@loopback/service-proxy@4.1.2...@loopback/service-proxy@5.0.0) (2022-05-05)
|
|
17
25
|
|
|
18
26
|
|
|
@@ -13,6 +13,14 @@ permalink: /doc/en/lb4/changelog.testlab.html
|
|
|
13
13
|
All notable changes to this project will be documented in this file.
|
|
14
14
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
15
15
|
|
|
16
|
+
## [5.0.2](https://github.com/loopbackio/loopback-next/compare/@loopback/testlab@5.0.1...@loopback/testlab@5.0.2) (2022-07-14)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @loopback/testlab
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
16
24
|
## [5.0.1](https://github.com/loopbackio/loopback-next/compare/@loopback/testlab@5.0.0...@loopback/testlab@5.0.1) (2022-06-13)
|
|
17
25
|
|
|
18
26
|
**Note:** Version bump only for package @loopback/testlab
|
|
@@ -13,6 +13,14 @@ permalink: /doc/en/lb4/changelog.tsdocs.html
|
|
|
13
13
|
All notable changes to this project will be documented in this file.
|
|
14
14
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
15
15
|
|
|
16
|
+
## [4.0.1](https://github.com/loopbackio/loopback-next/compare/@loopback/tsdocs@4.0.0...@loopback/tsdocs@4.0.1) (2022-06-13)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @loopback/tsdocs
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
16
24
|
## [4.0.0](https://github.com/loopbackio/loopback-next/compare/@loopback/tsdocs@3.1.2...@loopback/tsdocs@4.0.0) (2022-05-05)
|
|
17
25
|
|
|
18
26
|
|
|
@@ -56,7 +56,7 @@ For example:
|
|
|
56
56
|
},
|
|
57
57
|
})
|
|
58
58
|
class MyController {
|
|
59
|
-
// The operation endpoint defined here will be
|
|
59
|
+
// The operation endpoint defined here will be overridden!
|
|
60
60
|
@get('/greet')
|
|
61
61
|
greet(@param.query.number('limit') name: string) {}
|
|
62
62
|
}
|
|
@@ -513,7 +513,7 @@ export class SomeController {
|
|
|
513
513
|
|
|
514
514
|
#### anyOf, allOf, oneOf, not
|
|
515
515
|
|
|
516
|
-
The `x-ts-type`
|
|
516
|
+
The `x-ts-type` extension is also valid as a value in `allOf`, `anyOf`, `oneOf`,
|
|
517
517
|
and `not` schema keys.
|
|
518
518
|
|
|
519
519
|
```ts
|
|
@@ -676,7 +676,7 @@ This decorator lets you easily add response specifications using `Models` from
|
|
|
676
676
|
`@loopback/repository`. The convenience decorator sets the `content-type` to
|
|
677
677
|
`application/json`, and the response description to the string value in the
|
|
678
678
|
`http-status` module. The models become references through the `x-ts-type`
|
|
679
|
-
schema
|
|
679
|
+
schema extension.
|
|
680
680
|
|
|
681
681
|
```ts
|
|
682
682
|
@model()
|
|
@@ -131,7 +131,7 @@ stored. However, the framework itself does not store actual data.
|
|
|
131
131
|
|
|
132
132
|
_Important_: LoopBack 4 is in developer preview. How its application
|
|
133
133
|
configuration data reside and is being used may be subjected to change. More
|
|
134
|
-
information will be provided once the code has
|
|
134
|
+
information will be provided once the code has stabilized.
|
|
135
135
|
|
|
136
136
|
##### Personal data used for online contact with IBM
|
|
137
137
|
|
|
@@ -120,7 +120,7 @@ methods.
|
|
|
120
120
|
[#1293](https://github.com/loopbackio/loopback-next/issues/1293)
|
|
121
121
|
and
|
|
122
122
|
[#2035](https://github.com/loopbackio/loopback-next/issues/2035)
|
|
123
|
-
to track the progress on supporting Express
|
|
123
|
+
to track the progress on supporting Express middleware in LoopBack 4." %}
|
|
124
124
|
|
|
125
125
|
If you want to mount an Express router in a LoopBack 4 application, you can use
|
|
126
126
|
the
|
|
@@ -244,10 +244,10 @@ export class UserApplication extends BootMixin(
|
|
|
244
244
|
|
|
245
245
|
You can configure the authentication endpoints with the following steps:
|
|
246
246
|
|
|
247
|
-
- For OAuth2
|
|
247
|
+
- For OAuth2 authorization flow, we need authentication endpoints that
|
|
248
248
|
participate to get the user validated with an external system.
|
|
249
249
|
- This essentially means the `@authenticate` decorator is used with different
|
|
250
|
-
|
|
250
|
+
semantics compared to the non-OAuth2 section above.
|
|
251
251
|
- Here the controller methods become small parts of the larger OAuth2 dialog.
|
|
252
252
|
- We ideally create a controller with two endpoints decorated with
|
|
253
253
|
`@authenticate(`{passport-strategy-name}`)`
|
|
@@ -104,7 +104,7 @@ Open the URL printed to console to view your front-end served from `public`
|
|
|
104
104
|
directory or go to `http://127.0.0.1:3000/explorer` to explore the REST API.
|
|
105
105
|
|
|
106
106
|
The LB3 application is now successfully mounted on a LB4 application, but we can
|
|
107
|
-
further optimize the setup so that only the bare
|
|
107
|
+
further optimize the setup so that only the bare necessary artifacts from the
|
|
108
108
|
LoopBack 3 application remain. This includes moving almost all of the middleware
|
|
109
109
|
to a common location so that they are shared by both the LoopBack 3 and the
|
|
110
110
|
LoopBack 4 apps.
|
|
@@ -38,7 +38,7 @@ Add the following import to `src/application.ts`:
|
|
|
38
38
|
import {CrudRestComponent} from '@loopback/rest-crud';
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
And the
|
|
41
|
+
And the following component to the application constructor:
|
|
42
42
|
|
|
43
43
|
```ts
|
|
44
44
|
this.component(CrudRestComponent);
|
|
@@ -15,7 +15,7 @@ Start the application by running npm start and go to
|
|
|
15
15
|
http://localhost:3000/explorer. You’ll see the 3 new endpoints under
|
|
16
16
|
`UserController` together with the other endpoints under `TodoController`.
|
|
17
17
|
|
|
18
|
-

|
|
19
19
|
|
|
20
20
|
1. Sign up using the/signup API
|
|
21
21
|
|
|
@@ -66,7 +66,7 @@ future without warning**
|
|
|
66
66
|
|
|
67
67
|
To use `BootExecOptions` you must directly call `bootstrapper.boot()` and pass
|
|
68
68
|
in `BootExecOptions`. `app.boot()` provided by `BootMixin` does not take any
|
|
69
|
-
|
|
69
|
+
parameters.
|
|
70
70
|
|
|
71
71
|
```ts
|
|
72
72
|
const bootstrapper: Bootstrapper = await this.get(
|
|
@@ -79,7 +79,7 @@ Now you run the scripts, such as:
|
|
|
79
79
|
}
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
- Set options
|
|
82
|
+
- Set options explicitly for the script
|
|
83
83
|
|
|
84
84
|
```sh
|
|
85
85
|
lb-tsc -p tsconfig.json --target es2017 --outDir dist
|
|
@@ -98,7 +98,7 @@ Now you run the scripts, such as:
|
|
|
98
98
|
|
|
99
99
|
### Stability: ⚠️Experimental⚠️
|
|
100
100
|
|
|
101
|
-
If you would like to use `ttypescript` and its
|
|
101
|
+
If you would like to use `ttypescript` and its available plugins, you can
|
|
102
102
|
substitute `lb-tsc` with `lb-ttsc`, or pass the option
|
|
103
103
|
`lb-tsc --use-ttypescript`. If `ttypescript` is not installed, the default
|
|
104
104
|
TypeScript compiler `tsc` will be used instead.
|
|
@@ -75,7 +75,7 @@ For the examples in the following sections, we are also assuming a model named
|
|
|
75
75
|
### Creating a CRUD Controller
|
|
76
76
|
|
|
77
77
|
Here is how you would use `defineCrudRestController` for exposing the CRUD
|
|
78
|
-
endpoints of an existing model with a
|
|
78
|
+
endpoints of an existing model with a repository.
|
|
79
79
|
|
|
80
80
|
1. Create a REST CRUD controller class for your model.
|
|
81
81
|
|
|
@@ -18,7 +18,7 @@ can be useful for our developers to build a scalable Node.js application.
|
|
|
18
18
|
- [Observers](7-observation.md) and [interceptors](6-interception.md) allows you
|
|
19
19
|
to add logic as part of the application life cycle events.
|
|
20
20
|
- [Configuration](8-configuration.md) can be added to extension points,
|
|
21
|
-
|
|
21
|
+
extensions and services which enables greater flexibility in your application.
|
|
22
22
|
- [Boot by convention](9-boot-by-convention.md) allows artifacts automatically
|
|
23
23
|
discovered and loaded.
|
|
24
24
|
|
|
@@ -92,7 +92,7 @@ Artifacts can be services, repositories, configuration, etc.
|
|
|
92
92
|
|
|
93
93
|
Since plain functions do not accept injections, you can create a wrapper
|
|
94
94
|
class that has the ability to accept injection. For example, you can create a
|
|
95
|
-
provider class that
|
|
95
|
+
provider class that receives injection of a HTTP request.
|
|
96
96
|
|
|
97
97
|
5. As an alias to another binding
|
|
98
98
|
|
|
@@ -134,7 +134,7 @@ For details, see [Configure the scope](../../Binding.md#configure-the-scope).
|
|
|
134
134
|
|
|
135
135
|
## Watching artifacts
|
|
136
136
|
|
|
137
|
-
The context view gives us control when a binding is being added or
|
|
137
|
+
The context view gives us control when a binding is being added or removed. This
|
|
138
138
|
also allows the support of dynamic extension points. For the
|
|
139
139
|
[greeting-app example](https://github.com/loopbackio/loopback-next/tree/master/examples/greeting-app),
|
|
140
140
|
after the application has started, more greeters can be added, and there is no
|
|
@@ -148,7 +148,7 @@ for more details.
|
|
|
148
148
|
|
|
149
149
|
[Components](../../Component.md) can be considered as a collection of binding
|
|
150
150
|
added to the context. For example, for an authentication component, an
|
|
151
|
-
authentication
|
|
151
|
+
authentication strategy and an authentication action can be added to the
|
|
152
152
|
component.
|
|
153
153
|
|
|
154
154
|
See the
|
|
@@ -51,7 +51,7 @@ export class CalculatorController {
|
|
|
51
51
|
|
|
52
52
|
#### Adding the imports into the Controller
|
|
53
53
|
|
|
54
|
-
Add the following two lines at the
|
|
54
|
+
Add the following two lines at the beginning of the
|
|
55
55
|
src/controllers/calculator.controller.ts file.
|
|
56
56
|
|
|
57
57
|
The **get** and **param** are classes imported from the **LB4** REST server and
|