Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): fix broken links #6199

Merged
merged 1 commit into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/site/Component.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ properties:
context.
- `servers` - A map of name/class pairs for [servers](Server.md).
- `lifeCycleObservers` - An array of [life cycle observers](Life-cycle.md).
- `services` - An array of [service](Services.md) classes or providers.
- `services` - An array of [service](Service.md) classes or providers.
- `bindings` - An array of [bindings](Binding.md) to be added to the application
context. A good example of using bindings to extend the functionality of a
LoopBack 4 app is
Expand Down
2 changes: 1 addition & 1 deletion docs/site/Controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class HelloController {
```

- `HelloRepository` extends from `Repository`, which is LoopBack's database
abstraction. See [Repositories](./Repositories.md) for more.
abstraction. See [Repositories](./Repository.md) for more.
- `HelloMessage` is the arbitrary object that `list` returns a list of.
- `@get('/messages')` automatically creates the
[Paths Item Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#path-item-object)
Expand Down
2 changes: 1 addition & 1 deletion docs/site/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ create a completely separate key. See

### Can I attach an Express router?

Yes. See [Mounting an Express Router](Routes.md#mounting-an-express-router).
Yes. See [Mounting an Express Router](Route.md#mounting-an-express-router).

### Can I mount an Express middleware?

Expand Down
2 changes: 1 addition & 1 deletion docs/site/HasMany-relation.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ controller methods is employed for `hasMany` repositories. Once the hasMany
relation has been defined and configured, controller methods can call the
underlying constrained repository CRUD APIs and expose them as routes once
decorated with
[Route decorators](Routes.md#using-route-decorators-with-controller-methods). It
[Route decorators](Route.md#using-route-decorators-with-controller-methods). It
will require the value of the foreign key and, depending on the request method,
a value for the target model instance as demonstrated below.

Expand Down
2 changes: 1 addition & 1 deletion docs/site/HasManyThrough-relation.md
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ export class UserRepository extends DefaultCrudRepository<
Once the hasManyThrough relation has been defined and configured, controller
methods can call the underlying constrained repository CRUD APIs and expose them
as routes once decorated with
[Route decorators](Routes.md#using-route-decorators-with-controller-methods). It
[Route decorators](Route.md#using-route-decorators-with-controller-methods). It
will require the value of the foreign key and, depending on the request method,
a value for the target model instance as demonstrated below.

Expand Down
2 changes: 1 addition & 1 deletion docs/site/HasOne-relation.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ controller methods is employed for `hasOne` repositories. Once the hasOne
relation has been defined and configured, controller methods can call the
underlying constrained repository CRUD APIs and expose them as routes once
decorated with
[Route decorators](Routes.md#using-route-decorators-with-controller-methods). It
[Route decorators](Route.md#using-route-decorators-with-controller-methods). It
will require the value of the foreign key and, depending on the request method,
a value for the target model instance as demonstrated below.

Expand Down
2 changes: 1 addition & 1 deletion docs/site/Implementing-features.shelved.md
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ export class ProductController {
```

More information on `HttpErrors` can be found in
[Controllers](./Controllers.md#handling-errors-in-controllers)
[Controllers](./Controller.md#handling-errors-in-controllers)

### Implement a custom Sequence

Expand Down
2 changes: 1 addition & 1 deletion docs/site/Interceptor.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ app.interceptor(CachingInterceptorProvider, {

Global interceptors are also executed for route handler functions without a
controller class. See an example in
[Route Handler](Routes.md#using-partial-openapi-spec-fragments).
[Route Handler](Route.md#using-partial-openapi-spec-fragments).

### Create a proxy to apply interceptors

Expand Down
18 changes: 9 additions & 9 deletions docs/site/LB3-vs-LB4-request-response-cycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ the
[RestApplication.mountExpressRouter()](./apidocs/apidocs.rest.restapplication.mountexpressrouter.md)
API.

Using [Controllers](./Controllers.md) is the recommended way for creating custom
Using [Controllers](./Controller.md) is the recommended way for creating custom
(and REST) endpoints on your application. Its support for
[dependency injection](./Dependency-injection.md) and
[Interceptors](./Interceptors.md) makes it a very powerful extension mechanism.
Expand All @@ -64,9 +64,9 @@ required anymore because of architectural changes.
In LoopBack 3, models files automatically create the corresponding REST API
endpoints and the database query machinery (using the configured datasource). In
LoopBack 4, model files are limited only to describing the properties of the
data. You will have to create a corresponding [Repository](./Repositories.md)
for database connectivity, and [controllers](./Controllers.md) for creating the
REST API endpoint.
data. You will have to create a corresponding [Repository](./Repository.md) for
database connectivity, and [controllers](./Controller.md) for creating the REST
API endpoint.

The fact that you have to create two more artifacts along with the model to get
a REST endpoint working might seem overly tedious at first. However, the
Expand All @@ -93,7 +93,7 @@ Node.js module which exports a function with the signature
`function(app, options)`. In LoopBack 4, a [component](./Creating-components.md)
is a TypeScript class which can add [servers](./Server.md),
[observers](./Life-cycle.md), [providers](./Creating-components.md#providers),
and [controllers](./Controllers.md) to the application using dependency
and [controllers](./Controller.md) to the application using dependency
injection.

LoopBack 3 components adding routes can be migrated to LoopBack 4 by moving the
Expand Down Expand Up @@ -325,10 +325,10 @@ loaded using the
[app.mountExpressRouter() ](./apidocs/apidocs.rest.restapplication.mountexpressrouter.md)
method, using the familiar Express middleware signature.

[Controllers](./Controllers.md), [services](./Services.md), and
[repositories](./Repositories.md) are LoopBack 4 artifacts that participate in
the request/response cycle. The request and response objects can be made
available to them via [dependency injection](./Dependency-injection.md).
[Controllers](./Controller.md), [services](./Service.md), and
[repositories](./Repository.md) are LoopBack 4 artifacts that participate in the
request/response cycle. The request and response objects can be made available
to them via [dependency injection](./Dependency-injection.md).

Example of accesssing the request and response object in a Controller:

Expand Down
2 changes: 1 addition & 1 deletion docs/site/REST-action-sequence.md
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ In LoopBack, we typically use [Controllers](Controller.md) and

To support interoperability with Express, it is also possible to take an Express
Router instance and add it to a LoopBack application as an external router - see
[Mounting an Express Router](Routes.md#mounting-an-express-router). This way it
[Mounting an Express Router](Route.md#mounting-an-express-router). This way it
is possible to implement server endpoints using Express APIs.

### Static files
Expand Down
2 changes: 1 addition & 1 deletion docs/site/REST-middleware-sequence.md
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ In LoopBack, we typically use [Controllers](Controller.md) and

To support interoperability with Express, it is also possible to take an Express
Router instance and add it to a LoopBack application as an external router - see
[Mounting an Express Router](Routes.md#mounting-an-express-router). This way it
[Mounting an Express Router](Route.md#mounting-an-express-router). This way it
is possible to implement server endpoints using Express APIs.

### Static files
Expand Down
6 changes: 3 additions & 3 deletions docs/site/decorators/Decorators_openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permalink: /doc/en/lb4/Decorators_openapi.html

Route decorators are used to expose controller methods as REST API operations.
If you are not familiar with the concept of Route or Controller, please see
[LoopBack Route](../Routes.md) and [LoopBack Controller](../Controllers.md) to
[LoopBack Route](../Route.md) and [LoopBack Controller](../Controller.md) to
learn more about them.

By calling a route decorator, you provide OpenAPI specification to describe the
Expand Down Expand Up @@ -64,7 +64,7 @@ app.controller(MyController);
```

A more detailed explanation can be found in
[Specifying Controller APIs](../Controllers.md#specifying-controller-apis)
[Specifying Controller APIs](../Controller.md#specifying-controller-apis)

### Operation Decorator

Expand Down Expand Up @@ -192,7 +192,7 @@ class MyController {
```

You can find specific use cases in
[Writing Controller methods](../Controllers.md#writing-controller-methods)
[Writing Controller methods](../Controller.md#writing-controller-methods)

_The parameter location cookie is not supported yet, see_
_(https://github.com/strongloop/loopback-next/issues/997)_
Expand Down
10 changes: 5 additions & 5 deletions docs/site/decorators/Decorators_repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Repository decorators are used for defining models (domain objects) for use with
your chosen datasources and for the navigation strategies among models.

If you are not familiar with repository related concepts like `Model`, `Entity`
and `Datasource`, see LoopBack concept [Repositories](../Repositories.md) to
learn more.
and `Datasource`, see LoopBack concept [Repositories](../Repository.md) to learn
more.

### Model Decorators

Expand All @@ -41,7 +41,7 @@ Syntax: `@model(definition?: ModelDefinitionSyntax)`
Model decorator is a class decorator. In LoopBack 4, we inherit the model
definition format from LoopBack 3, which is described in the
[Model definition JSON file](https://loopback.io/doc/en/lb3/Model-definition-JSON-file).
For usage examples, see [Define Models](../Repositories.md#define-models).
For usage examples, see [Define Models](../Repository.md#define-models).

_Please note we will elaborate more about model and model definition in the
[Model](../Model.md) page, and replace the link above with a LoopBack 4 link_
Expand Down Expand Up @@ -72,7 +72,7 @@ The property decorator defines metadata for a property on a Model definition.
The format of property definitions can be found in
[Property definitions](https://loopback.io/doc/en/lb2/Model-definition-JSON-file.html#properties)

For usage examples, see [Define Models](../Repositories.md#define-models).
For usage examples, see [Define Models](../Repository.md#define-models).

### Repository Decorator

Expand All @@ -84,7 +84,7 @@ This decorator either injects an existing repository or creates a repository
from a model and a datasource.

The injection example can be found in
[Repository#controller-configuration](../Repositories.md#controller-configuration).
[Repository#controller-configuration](../Repository.md#controller-configuration).

To create a repository in a controller, you can define your model and datasource
first, then import them in your controller file:
Expand Down
2 changes: 1 addition & 1 deletion docs/site/express-with-lb4-rest-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ suit their needs.
If you want to use LoopBack as the host instead and mount your Express
application on a LoopBack 4 application, see
[Using Express Middleware](Express-middleware.md) and
[Mounting an Express Router](Routes.md#mounting-an-express-router).
[Mounting an Express Router](Route.md#mounting-an-express-router).
" %}

This tutorial assumes familiarity with scaffolding a LoopBack 4 application,
Expand Down
6 changes: 3 additions & 3 deletions docs/site/migration/LB3-vs-LB4-booting.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ required anymore." %}
more about datasource booter
[here](../Booting-an-Application.md#controller-booter).

Read more about LoopBack 4 datasources [here](../DataSources.md). Read more
about migrating datasources [here](./datasources.md).
Read more about LoopBack 4 datasources [here](../DataSource.md). Read more about
migrating datasources [here](./datasources.md).

#### 3. Definition of models

Expand Down Expand Up @@ -136,7 +136,7 @@ Node.js module which exports a function with the signature
[component](../Creating-components.md) is a TypeScript class which can add
[servers](../Server.md), [observers](../Life-cycle.md),
[providers](../Creating-components.md#providers), and
[controllers](../Controllers.md) to the application using dependency injection.
[controllers](../Controller.md) to the application using dependency injection.

LoopBack 3 components adding routes can be migrated to LoopBack 4 by moving the
functionality to the controller of a LoopBack 4 component.
Expand Down
4 changes: 2 additions & 2 deletions docs/site/migration/components/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ LoopBack 4 components can contribute:
- [Mixins](../../Mixin.md)
- [Decorators](../../Creating-decorators.md)
- [Sequence Actions](../../Sequence.md#actions)
- [Controllers](../../Controllers.md)
- [Controllers](../../Controller.md)
- [Life cycle observers](../../Extension-life-cycle.md)
- [Repositories](../../Repositories.md)
- [Repositories](../../Repository.md)
- [Service proxies](../../Calling-other-APIs-and-Web-Services.md)
- [Servers](../../Creating-servers.md)
- [HTTP request parsers](../../Extending-request-body-parsing.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/site/migration/components/project-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ environment-specific configuration by using `component-config.{env}.json` files.
## LoopBack 4 layout

As explained in [Creating components](../../Creating-Components.md) and
[Using components](../../Components.md#using-components), a typical LoopBack 4
[Using components](../../Component.md#using-components), a typical LoopBack 4
component is an npm package exporting a Component class.

The component class is usually implemented inside
Expand Down
5 changes: 2 additions & 3 deletions docs/site/migration/models/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ public (REST) API.

In LoopBack 4, a model class is no longer responsible for everything. We have
[Models](../../Model.md) to describe shape of data,
[Repositories](../../Repositories.md) to provide persistence-related behavior
and finally [Controllers](../../Controllers.md) to implement public APIs. The
section
[Repositories](../../Repository.md) to provide persistence-related behavior and
finally [Controllers](../../Controller.md) to implement public APIs. The section
[Migrating models persisted in a database](#migrating-models-persisted-in-a-database)
describes how to create these artifacts for models persisted in a database.

Expand Down
4 changes: 2 additions & 2 deletions docs/site/migration/models/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ implementing REST API.

In LoopBack 4,

- data-access APIs are implemented by [repositories](../../Repositories.md) that
- data-access APIs are implemented by [repositories](../../Repository.md) that
are decoupled from models.
- REST APIs are implemented by [controllers](docs/site/Controllers.md) that are
- REST APIs are implemented by [controllers](docs/site/Controller.md) that are
decoupled from models.

A `Repository` represents a specialized service interface that provides
Expand Down
6 changes: 3 additions & 3 deletions docs/site/migration/models/remoting-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ application developers to implement similar functionality.
LoopBack 4 route handler. They correspond to LoopBack 3 **global hooks**.
- [**Class level interceptors**](../../Interceptors.md#class-level-interceptors)
are executed for requests handled by the given
[Controller](../../Controllers.md) class. They correspond to LoopBack 3
**model level hooks**.
[Controller](../../Controller.md) class. They correspond to LoopBack 3 **model
level hooks**.
- [**Method level interceptors**](../../Interceptors.md#method-level-interceptors)
are executed only for request handled by the given controller method. They
correspond to LoopBack 3 **method level hooks**.
Expand Down Expand Up @@ -453,7 +453,7 @@ async function intercept(

In order to reject a request and return an error HTTP response, just throw an
error from your interceptor. As explained in
[Handling errors in controllers](../../Controllers.md#handling-errors-in-controllers),
[Handling errors in controllers](../../Controller.md#handling-errors-in-controllers),
you can use one of `HttpErrors` constructors to control the HTTP status code of
the response.

Expand Down
8 changes: 4 additions & 4 deletions docs/site/migration/not-planned.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ In LoopBack 4, you can implement a similar functionality as follows:
the Node.js client library provided by your provider. You may want to check
[multer-storage-pkgcloud](https://github.com/dustin-H/multer-storage-pkgcloud)

4. Finally, create a [Service](../Services.md) providing File and Container APIs
in TypeScript and one or more [Controllers](../Controllers.md) to implement
4. Finally, create a [Service](../Service.md) providing File and Container APIs
in TypeScript and one or more [Controllers](../Controller.md) to implement
the REST API.

_If you are happy with the outcome, then please consider packaging your code as
a [LoopBack Component](../Creating-components.md) and sharing your great work
with the entire LoopBack community. We are happy to promote it in our
documentation, just submit a pull request to add your component to
[Using components](../Components.md#using-components)._
[Using components](../Component.md#using-components)._

## Push notifications

Expand All @@ -95,7 +95,7 @@ In LoopBack 4, you can re-create a similar functionality as follows:

- Implement models, repositories and controllers to provide Device and
Application model.
- Implement a [Service](../Services.md) to provide TypeScript API for sending
- Implement a [Service](../Service.md) to provide TypeScript API for sending
notifications and persisting scheduled notifications to be sent later. You can
use packages like [apn](https://www.npmjs.com/package/apn) and
[node-gcm](https://www.npmjs.com/package/node-gcm) to interact with Apple's
Expand Down
2 changes: 1 addition & 1 deletion docs/site/tutorials/connectors/Mongodb-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class UserRepository extends DefaultCrudRepository<

### 5. Create endpoints and view data using API Explorer

Once we built a [controller](../../Controllers.md) with `lb4 controller` to
Once we built a [controller](../../Controller.md) with `lb4 controller` to
handle requests:

```bash
Expand Down
2 changes: 1 addition & 1 deletion docs/site/tutorials/connectors/Mysql-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ mysql> describe User;

### 6. Create endpoints and view data using API Explorer

Once we built a [controller](../../Controllers.md) with `lb4 controller` to
Once we built a [controller](../../Controller.md) with `lb4 controller` to
handle requests:

```bash
Expand Down
2 changes: 1 addition & 1 deletion docs/site/tutorials/connectors/Oracle-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ HASACCOUNT CHAR 1

### 6. Create endpoints and view data using API Explorer

Once we built a [controller](../../Controllers.md) with `lb4 controller` to
Once we built a [controller](../../Controller.md) with `lb4 controller` to
handle requests:

```bash
Expand Down
2 changes: 1 addition & 1 deletion docs/site/tutorials/connectors/Postgresql-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ If you check the database, you should able to see the table `user`.

### 6. Create endpoints and view data using API Explorer

Once we built a [controller](../../Controllers.md) with `lb4 controller` to
Once we built a [controller](../../Controller.md) with `lb4 controller` to
handle requests:

```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ summary:

Defining business logic to handle requests to related models isn't too different
from handling requests for standalone models. We'll create
[controllers](../../Controllers.md) to handle requests for todo-lists and todo
[controllers](../../Controller.md) to handle requests for todo-lists and todo
items under a todo-list.

### Create TodoList controller
Expand Down
2 changes: 1 addition & 1 deletion docs/site/tutorials/todo/todo-tutorial-controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ summary: LoopBack 4 Todo Application Tutorial - Add a Controller

### Controllers

In LoopBack 4, [controllers](../../Controllers.md) handle the request-response
In LoopBack 4, [controllers](../../Controller.md) handle the request-response
lifecycle for your API. Each function on a controller can be addressed
individually to handle an incoming request (like a POST request to `/todos`), to
perform business logic, and to return a response.
Expand Down
4 changes: 2 additions & 2 deletions docs/site/tutorials/todo/todo-tutorial-datasource.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ Repositories for Data operations.
In LoopBack 4, datasources can be represented as strongly-typed objects and
freely made available for [injection](../../Dependency-injection.md) throughout
the application. Typically, in LoopBack 4, datasources are used in conjunction
with [Repositories](../../Repositories.md) to provide access to data.
with [Repositories](../../Repository.md) to provide access to data.

For more information about datasources in LoopBack, see
[DataSources](../../DataSources.md).
[DataSources](../../DataSource.md).

Since our Todo API will need to persist instances of Todo items, we'll need to
create a datasource definition to make this possible.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ summary:
### Services

To call other APIs and web services from LoopBack applications, we recommend to
use [Service Proxies](../../Services.md) as a design pattern for encapsulating
use [Service Proxies](../../Service.md) as a design pattern for encapsulating
low-level implementation details of communication with 3rd-party services and
providing JavaScript/TypeScript API that's easy to consume e.g. from
Controllers. See
Expand Down
Loading