Skip to content

Commit 1555e20

Browse files
committed
docs: fix typo in scalar page
1 parent 261b798 commit 1555e20

File tree

7 files changed

+19
-21
lines changed

7 files changed

+19
-21
lines changed

docs/docs/configuration.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ It is also possible to split the configuration by using the @@Module@@:
152152

153153
- type: `string[]`
154154

155-
List of glob pattern to scan directories which contains [Services](/docs/services)
155+
List of glob pattern to scan directories which contains [Services](/docs/prodivers)
156156
or [Middlewares](/docs/middlewares).
157157

158158
### middlewares
@@ -444,9 +444,8 @@ export class MyService {
444444

445445
Decorators @@Constant@@ and @@Value@@ can be used in all classes including:
446446

447-
- [Provider](/docs/providers),
447+
- [Provider & Service](/docs/providers),
448448
- [Interceptor](/docs/interceptors),
449-
- [Service](/docs/services),
450449
- [Controller](/docs/controllers),
451450
- [Middleware](/docs/middlewares).
452451

docs/docs/configuration/index.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ It is also possible to split the configuration by using the @@Module@@:
148148

149149
- type: `string[]`
150150

151-
List of glob pattern to scan directories which contains [Services](/docs/services)
151+
List of glob pattern to scan directories which contains [Services](/docs/providers)
152152
or [Middlewares](/docs/middlewares).
153153

154154
### middlewares
@@ -422,7 +422,7 @@ export class Server {}
422422
The configuration can be reused throughout your application in different ways.
423423

424424
- With dependency injection in [Controller](/docs/controllers), [Middleware](/docs/middlewares)
425-
, [Pipe](/docs/pipes) or any [Injectable](/docs/services) services.
425+
, [Pipe](/docs/pipes) or any [Injectable](/docs/providers) services.
426426
- With the decorators @@Constant@@ and @@Value@@.
427427

428428
### From service (DI)
@@ -440,9 +440,8 @@ export class MyService {
440440

441441
Decorators @@Constant@@ and @@Value@@ can be used in all classes including:
442442

443-
- [Provider](/docs/providers),
443+
- [Provider & Service](/docs/providers),
444444
- [Interceptor](/docs/interceptors),
445-
- [Service](/docs/services),
446445
- [Controller](/docs/controllers),
447446
- [Middleware](/docs/middlewares).
448447

docs/tutorials/scalar.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ When using helmet, there may be a problem with CSP, to solve this collision, con
4545
directives: {
4646
defaultSrc: [`'self'`],
4747
styleSrc: [`'self'`, `'unsafe-inline'`],
48-
imgSrc: [`'self'`, "data:", "validator.swagger.io"],
48+
imgSrc: [`'self'`, "data:", "validator.scalar.io"],
4949
scriptSrc: [`'self'`, `https: 'unsafe-inline'`]
5050
}
5151
}
@@ -75,14 +75,14 @@ Some options are available to configure Scalar, Ts.ED and the default spec infor
7575
| -------------------- | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
7676
| path | `/api-doc` | The url subpath to access to the documentation. |
7777
| specVersion | `3.0.1` | The OpenSpec version. |
78-
| fileName | `swagger.json` | Swagger file name. By default swagger.json. |
79-
| doc | `hidden-doc` | The documentation key used by `@Docs` decorator to create several swagger documentations. |
78+
| fileName | `openapi.json` | OpenAPI file name. By default openapi.json. |
79+
| doc | `hidden-doc` | The documentation key used by `@Docs` decorator to create several openapi documentations. |
8080
| viewPath | `${rootDir}/views/scalar.ejs` or `false` | The path to the ejs template. Set false to disabled scalar. |
8181
| cssPath | `${rootDir}/assets/scalar.css` | The path to the CSS file. |
8282
| showExplorer | `true` | Display the search field in the navbar. |
83-
| spec | `{swagger: "2.0"}` | The default information spec. |
84-
| specPath | `${rootDir}/spec/swagger.base.json` | Load the base spec documentation from the specified path. |
85-
| outFile | `${rootDir}/spec/swagger.json` | Write the `swagger.json` spec documentation on the specified path. |
83+
| spec | `{openapi: "3.1.0"}` | The default information spec. |
84+
| specPath | `${rootDir}/spec/openapi.base.json` | Load the base spec documentation from the specified path. |
85+
| outFile | `${rootDir}/spec/openapi.json` | Write the `openapi.json` spec documentation on the specified path. |
8686
| hidden | `true` | Hide the documentation in the dropdown explorer list. |
8787
| options | Scalar options | Scalar options. See (https://github.com/scalar/scalar/tree/main/packages/api-reference#props) |
8888
| operationIdFormatter | `(name: string, propertyKey: string, path: string) => string` | A function to generate the operationId. |
@@ -94,7 +94,7 @@ Some options are available to configure Scalar, Ts.ED and the default spec infor
9494

9595
#### By decorators
9696

97-
It's also possible to create several swagger documentations with the `doc` option:
97+
It's also possible to create several openapi documentations with the `doc` option:
9898

9999
<<< @/tutorials/snippets/scalar/multi-spec.ts
100100

@@ -109,10 +109,10 @@ You can use the `pathPatterns` options to include only controllers whose paths m
109109
```typescript
110110
import {Configuration} from "@tsed/common";
111111
import "@tsed/platform-express";
112-
import "@tsed/scalar"; // import swagger Ts.ED module
112+
import "@tsed/scalar"; // import scalar Ts.ED module
113113

114114
@Configuration({
115-
swagger: [
115+
scalar: [
116116
{
117117
path: "/api-admin",
118118
pathPatterns: ["/rest/admin/**"]

docs/tutorials/snippets/scalar/configuration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import "@tsed/platform-express";
2-
import "@tsed/swagger"; // import swagger Ts.ED module
2+
import "@tsed/scalar"; // import swagger Ts.ED module
33

44
import {Configuration} from "@tsed/di";
55

66
@Configuration({
7-
swagger: [
7+
scalar: [
88
{
99
path: "/doc",
1010
specVersion: "3.0.1"

docs/tutorials/snippets/scalar/multi-spec-controllers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Controller} from "@tsed/di";
2-
import {Docs} from "@tsed/swagger";
2+
import {Docs} from "@tsed/scalar";
33

44
@Controller("/calendars")
55
@Docs("api-v2") // display this controllers only for api-docs-v2

docs/tutorials/snippets/scalar/multi-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import "@tsed/platform-express";
2-
import "@tsed/swagger"; // import swagger Ts.ED module
2+
import "@tsed/scalar"; // import scalar Ts.ED module
33

44
import {Configuration} from "@tsed/di";
55

packages/di/src/common/services/InjectorService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ export class InjectorService extends Container {
298298
}
299299

300300
/**
301-
* Emit an event to all service. See service [lifecycle hooks](/docs/services.md#lifecycle-hooks).
301+
* Emit an event to all service. See service [lifecycle hooks](/docs/hooks.md#lifecycle-hooks).
302302
* @param eventName The event name to emit at all services.
303303
* @param args List of the parameters to give to each service.
304304
* @returns A list of promises.

0 commit comments

Comments
 (0)