diff --git a/docs/docs/configuration/index.md b/docs/docs/configuration/index.md index c4dab3563a3..6fa914a6059 100644 --- a/docs/docs/configuration/index.md +++ b/docs/docs/configuration/index.md @@ -148,7 +148,7 @@ It is also possible to split the configuration by using the @@Module@@: - type: `string[]` -List of glob pattern to scan directories which contains [Services](/docs/services) +List of glob pattern to scan directories which contains [Services](/docs/providers) or [Middlewares](/docs/middlewares). ### middlewares @@ -422,7 +422,7 @@ export class Server {} The configuration can be reused throughout your application in different ways. - With dependency injection in [Controller](/docs/controllers), [Middleware](/docs/middlewares) - , [Pipe](/docs/pipes) or any [Injectable](/docs/services) services. + , [Pipe](/docs/pipes) or any [Injectable](/docs/providers) services. - With the decorators @@Constant@@ and @@Value@@. ### From service (DI) @@ -440,9 +440,8 @@ export class MyService { Decorators @@Constant@@ and @@Value@@ can be used in all classes including: -- [Provider](/docs/providers), +- [Provider & Service](/docs/providers), - [Interceptor](/docs/interceptors), -- [Service](/docs/services), - [Controller](/docs/controllers), - [Middleware](/docs/middlewares). diff --git a/docs/tutorials/scalar.md b/docs/tutorials/scalar.md index 7d77d55e333..d7e7539b463 100644 --- a/docs/tutorials/scalar.md +++ b/docs/tutorials/scalar.md @@ -45,7 +45,7 @@ When using helmet, there may be a problem with CSP, to solve this collision, con directives: { defaultSrc: [`'self'`], styleSrc: [`'self'`, `'unsafe-inline'`], - imgSrc: [`'self'`, "data:", "validator.swagger.io"], + imgSrc: [`'self'`, "data:", "validator.scalar.io"], scriptSrc: [`'self'`, `https: 'unsafe-inline'`] } } @@ -75,14 +75,14 @@ Some options are available to configure Scalar, Ts.ED and the default spec infor | -------------------- | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | | path | `/api-doc` | The url subpath to access to the documentation. | | specVersion | `3.0.1` | The OpenSpec version. | -| fileName | `swagger.json` | Swagger file name. By default swagger.json. | -| doc | `hidden-doc` | The documentation key used by `@Docs` decorator to create several swagger documentations. | +| fileName | `openapi.json` | OpenAPI file name. By default openapi.json. | +| doc | `hidden-doc` | The documentation key used by `@Docs` decorator to create several openapi documentations. | | viewPath | `${rootDir}/views/scalar.ejs` or `false` | The path to the ejs template. Set false to disabled scalar. | | cssPath | `${rootDir}/assets/scalar.css` | The path to the CSS file. | | showExplorer | `true` | Display the search field in the navbar. | -| spec | `{swagger: "2.0"}` | The default information spec. | -| specPath | `${rootDir}/spec/swagger.base.json` | Load the base spec documentation from the specified path. | -| outFile | `${rootDir}/spec/swagger.json` | Write the `swagger.json` spec documentation on the specified path. | +| spec | `{openapi: "3.1.0"}` | The default information spec. | +| specPath | `${rootDir}/spec/openapi.base.json` | Load the base spec documentation from the specified path. | +| outFile | `${rootDir}/spec/openapi.json` | Write the `openapi.json` spec documentation on the specified path. | | hidden | `true` | Hide the documentation in the dropdown explorer list. | | options | Scalar options | Scalar options. See (https://github.com/scalar/scalar/tree/main/packages/api-reference#props) | | 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 #### By decorators -It's also possible to create several swagger documentations with the `doc` option: +It's also possible to create several openapi documentations with the `doc` option: <<< @/tutorials/snippets/scalar/multi-spec.ts @@ -109,10 +109,10 @@ You can use the `pathPatterns` options to include only controllers whose paths m ```typescript import {Configuration} from "@tsed/common"; import "@tsed/platform-express"; -import "@tsed/scalar"; // import swagger Ts.ED module +import "@tsed/scalar"; // import scalar Ts.ED module @Configuration({ - swagger: [ + scalar: [ { path: "/api-admin", pathPatterns: ["/rest/admin/**"] diff --git a/docs/tutorials/snippets/scalar/configuration.ts b/docs/tutorials/snippets/scalar/configuration.ts index ba798f7d7d7..7b5ef234354 100644 --- a/docs/tutorials/snippets/scalar/configuration.ts +++ b/docs/tutorials/snippets/scalar/configuration.ts @@ -1,10 +1,10 @@ import "@tsed/platform-express"; -import "@tsed/swagger"; // import swagger Ts.ED module +import "@tsed/scalar"; // import swagger Ts.ED module import {Configuration} from "@tsed/di"; @Configuration({ - swagger: [ + scalar: [ { path: "/doc", specVersion: "3.0.1" diff --git a/docs/tutorials/snippets/scalar/multi-spec-controllers.ts b/docs/tutorials/snippets/scalar/multi-spec-controllers.ts index 721c037c629..3f5c66874ea 100644 --- a/docs/tutorials/snippets/scalar/multi-spec-controllers.ts +++ b/docs/tutorials/snippets/scalar/multi-spec-controllers.ts @@ -1,5 +1,5 @@ import {Controller} from "@tsed/di"; -import {Docs} from "@tsed/swagger"; +import {Docs} from "@tsed/scalar"; @Controller("/calendars") @Docs("api-v2") // display this controllers only for api-docs-v2 diff --git a/docs/tutorials/snippets/scalar/multi-spec.ts b/docs/tutorials/snippets/scalar/multi-spec.ts index 3d3ae256a3b..d722e0c7eb6 100644 --- a/docs/tutorials/snippets/scalar/multi-spec.ts +++ b/docs/tutorials/snippets/scalar/multi-spec.ts @@ -1,5 +1,5 @@ import "@tsed/platform-express"; -import "@tsed/swagger"; // import swagger Ts.ED module +import "@tsed/scalar"; // import scalar Ts.ED module import {Configuration} from "@tsed/di"; diff --git a/packages/di/src/common/services/InjectorService.ts b/packages/di/src/common/services/InjectorService.ts index 091a8bd4f68..8f2c505161e 100644 --- a/packages/di/src/common/services/InjectorService.ts +++ b/packages/di/src/common/services/InjectorService.ts @@ -298,7 +298,7 @@ export class InjectorService extends Container { } /** - * Emit an event to all service. See service [lifecycle hooks](/docs/services.md#lifecycle-hooks). + * Emit an event to all service. See service [lifecycle hooks](/docs/hooks.md#lifecycle-hooks). * @param eventName The event name to emit at all services. * @param args List of the parameters to give to each service. * @returns A list of promises.