Skip to content

Commit

Permalink
chore: improve wording
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Oct 17, 2024
1 parent 5e49051 commit 13da8e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/openapi/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async function bootstrap() {
bootstrap();
```

> info **Hint** The factory around `SwaggerModule#createDocument()` is only used to create the document when you actually request Swagger, saving some initialization time and is a serializable object conforming to [OpenAPI Document](https://swagger.io/specification/#openapi-document). Instead of hosting it via HTTP, you could also save it as a JSON/YAML file, and consume it in different ways.
> info **Hint** The factory method `SwaggerModule#createDocument()` is used specifically to generate the Swagger document when you request it. This approach helps save some initialization time, and the resulting document is a serializable object that conforms to the [OpenAPI Document](https://swagger.io/specification/#openapi-document) specification. Instead of serving the document over HTTP, you can also save it as a JSON or YAML file and use it in various ways.
The `DocumentBuilder` helps to structure a base document that conforms to the OpenAPI Specification. It provides several methods that allow setting such properties as title, description, version, etc. In order to create a full document (with all HTTP routes defined) we use the `createDocument()` method of the `SwaggerModule` class. This method takes two arguments, an application instance and a Swagger options object. Alternatively, we can provide a third argument, which should be of type `SwaggerDocumentOptions`. More on this in the [Document options section](/openapi/introduction#document-options).

Expand Down

0 comments on commit 13da8e0

Please sign in to comment.