Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Nov 15, 2024
2 parents 9b77845 + 1a22faa commit 27d1890
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.18.0
22.11.0
25 changes: 17 additions & 8 deletions content/openapi/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion content/recipes/prisma.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion content/recipes/swc.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 27d1890

Please sign in to comment.