diff --git a/.nvmrc b/.nvmrc index 2a393af592..7af24b7ddb 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.18.0 +22.11.0 diff --git a/content/openapi/introduction.md b/content/openapi/introduction.md index 442ae6349a..9015b7a852 100644 --- a/content/openapi/introduction.md +++ b/content/openapi/introduction.md @@ -119,16 +119,29 @@ export interface SwaggerDocumentOptions { /** * Custom operationIdFactory that will be used to generate the `operationId` - * based on the `controllerKey` and `methodKey` - * @default () => controllerKey_methodKey + * based on the `controllerKey`, `methodKey`, and version. + * @default () => controllerKey_methodKey_version */ - operationIdFactory?: (controllerKey: string, methodKey: string) => string; + operationIdFactory?: OperationIdFactory; + + /** + * Custom linkNameFactory that will be used to generate the name of links + * in the `links` field of responses + * + * @see [Link objects](https://swagger.io/docs/specification/links/) + * + * @default () => `${controllerKey}_${methodKey}_from_${fieldKey}` + */ + linkNameFactory?: ( + controllerKey: string, + methodKey: string, + fieldKey: string + ) => string; /* * Generate tags automatically based on the controller name. * If `false`, you must use the `@ApiTags()` decorator to define tags. * Otherwise, the controller name without the suffix `Controller` will be used. - * * @default true */ autoTagControllers?: boolean; @@ -197,10 +210,6 @@ export interface SwaggerCustomOptions { /** * If `true`, the selector of OpenAPI definitions is displayed in the Swagger UI interface. * Default: `false`. - * - * When `true` and `swaggerOptions.urls` is provided, a dropdown labeled "Select a definition" - * is shown in the Swagger UI, allowing users to select from the available API definitions - * specified in the `urls` array. */ explorer?: boolean; diff --git a/content/recipes/prisma.md b/content/recipes/prisma.md index e460f8e2f9..85de0bc84e 100644 --- a/content/recipes/prisma.md +++ b/content/recipes/prisma.md @@ -4,7 +4,7 @@ While Prisma can be used with plain JavaScript, it embraces TypeScript and provides a level to type-safety that goes beyond the guarantees other ORMs in the TypeScript ecosystem. You can find an in-depth comparison of the type-safety guarantees of Prisma and TypeORM [here](https://www.prisma.io/docs/concepts/more/comparisons/prisma-and-typeorm#type-safety). -> info **Note** If you want to get a quick overview of how Prisma works, you can follow the [Quickstart](https://www.prisma.io/docs/getting-started/quickstart) or read the [Introduction](https://www.prisma.io/docs/understand-prisma/introduction) in the [documentation](https://www.prisma.io/docs/). There also are ready-to-run examples for [REST](https://github.com/prisma/prisma-examples/tree/latest/typescript/rest-nestjs) and [GraphQL](https://github.com/prisma/prisma-examples/tree/latest/typescript/graphql-nestjs) in the [`prisma-examples`](https://github.com/prisma/prisma-examples/) repo. +> info **Note** If you want to get a quick overview of how Prisma works, you can follow the [Quickstart](https://www.prisma.io/docs/getting-started/quickstart) or read the [Introduction](https://www.prisma.io/docs/understand-prisma/introduction) in the [documentation](https://www.prisma.io/docs/). There also are ready-to-run examples for [REST](https://github.com/prisma/prisma-examples/tree/latest/orm/rest-nestjs) and [GraphQL](https://github.com/prisma/prisma-examples/tree/latest/orm/graphql-nestjs) in the [`prisma-examples`](https://github.com/prisma/prisma-examples/) repo. #### Getting started diff --git a/content/recipes/swc.md b/content/recipes/swc.md index a926bbb6d2..69e2ae803c 100644 --- a/content/recipes/swc.md +++ b/content/recipes/swc.md @@ -134,7 +134,7 @@ Now if you use CLI plugins, `swc-loader` will not load them automatically. Inste declare a `generate-metadata.ts` file near the `main.ts` file with the following content: ```ts -import { PluginMetadataGenerator } from '@nestjs/cli/lib/compiler/plugins'; +import { PluginMetadataGenerator } from '@nestjs/cli/lib/compiler/plugins/plugin-metadata-generator'; import { ReadonlyVisitor } from '@nestjs/swagger/dist/plugin'; const generator = new PluginMetadataGenerator();