# Swagger mapped types

We should then go to the file <mark style="color:purple;">update-user.dto</mark> and change the import of the <mark style="color:blue;">`PartialType`</mark>, from <mark style="color:blue;">`mapped-types`</mark> to <mark style="color:blue;">`swagger`</mark>. This should also be done with all the **mapped types** that are being used in the system. You can, for example, search for <mark style="color:blue;">`mapped-types`</mark>, to make this easier. With this, the functionality remains the same but it is also automatically detected by Swagger. When accessing the Swagger UI now, if you check the update user route and click on **schema**, you will also note that the fields are all optional, as they lack the red asterisk, present in the required fields.

{% hint style="info" %}
As the **@nestjs/swagger** package is installed, now newly-generated resources will use **mapped-types** from **swagger** by default.
{% endhint %}

<mark style="color:green;">**Commit**</mark> - Integrating mapped types with swagger

Our system has been almost entirely mapped by Swagger. However, some fine adjustments are still necessary, so let's go through them in order to have a more robust documentation.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kinesis-school-of-programming.gitbook.io/nestjs-unleashed/extra-module-3-openapi-specification/swagger-mapped-types.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
